android-titlebar

How can I remove the blank space in the Activity that is shown as a Dialog

╄→尐↘猪︶ㄣ 提交于 2019-12-12 02:41:39
问题 Hello, This is a Dialog Activity. I want to remove the blank space. How can I make it? Unfortunately, I am stuck.Thanks in advance.. This is my styles file <style name="ThemeDialog" parent="Theme.AppCompat.Light.Dialog"> <item name="android:windowActionBar">false</item> <item name="android:windowNoTitle">true</item> <item name="android:windowFullscreen">false</item> </style> This is my Manifest.xml <activity android:name=".Activities.AboutActivity" android:label="@string/hakkinda" android

How to remove the title when launching android app?

心不动则不痛 提交于 2019-12-09 04:50:19
问题 I already remove the title in onCreate() method. protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final ActionBar actionBar = getActionBar(); actionBar.setHomeButtonEnabled(false); actionBar.setDisplayShowHomeEnabled(false); actionBar.setDisplayUseLogoEnabled(false); actionBar.setDisplayShowTitleEnabled(false); } The title is not displayed. But still appears when launching the app. And I can use this

Is it possible to change the color of activity's title bar without FEATURE_CUSTOM_TITLE?

前提是你 提交于 2019-12-08 19:28:53
问题 All the solutions I have found so far for changing the color of the activity's title bar (i.e. the one accessed via activity.setTitle() and activity.setProgress()) mandate a FEATURE_CUSTOM_TITLE : https://stackoverflow.com/a/2285722/869501 But I am already using FEATURE_PROGRESS and Android forbids combining custom titles with other title features (by way of AndroidRuntimeException) and I don't want to give up that nice progress bar that's an integral part of my activity. The only hint about

Gradient styles

梦想的初衷 提交于 2019-12-08 17:36:02
问题 In my Android application I've hidden the default title bar, introduced a TabView and added my own titlebar under that TabView's tabs. At the moment, I'm using the ?android:attr/windowTitleStyle style which makes my new titlebar look gray and gradient. It looks pretty good, but my screens are looking pretty grayscale. I'd like to spice things up a bit by making this titlebar a different color gradient. What am I looking at here? Creating my own image and using it? The ?android:attr

android:set title bar in middle

混江龙づ霸主 提交于 2019-12-08 01:24:19
问题 I create the custom title using the style.I code some from http://labs.makemachine.net/2010/03/custom-android-window-title/ I have also set the icon in title bar using the setFeatureDrawableResource(Window.FEATURE_LEFT_ICON,R.drawable.title_logo); can it is possible to set the title bar in middle?if possible then I want set using the custom style. EDIT: i have check code http://andmobidev.blogspot.com/2010/01/centering-title-of-window.html it work fine when there no icon in title bar but when

android:set title bar in middle

让人想犯罪 __ 提交于 2019-12-06 08:42:59
I create the custom title using the style.I code some from http://labs.makemachine.net/2010/03/custom-android-window-title/ I have also set the icon in title bar using the setFeatureDrawableResource(Window.FEATURE_LEFT_ICON,R.drawable.title_logo); can it is possible to set the title bar in middle?if possible then I want set using the custom style. EDIT: i have check code http://andmobidev.blogspot.com/2010/01/centering-title-of-window.html it work fine when there no icon in title bar but when set the icon i get the error java.lang.ClassCastException: android.widget.RelativeLayout i have no

How to set the text color of titlebar?

蓝咒 提交于 2019-12-06 08:00:56
问题 I am using this as the theme. <style name="ThemeSelector" parent="android:Theme.Light"> <item name="android:windowTitleBackgroundStyle">@style/WindowTitleBackground</item> <item name="android:textAppearance">@style/TitleTextColor</item> </style> <style name="WindowTitleBackground"> <item name="android:background">@drawable/waterblue</item> </style> <style name="TitleTextColor"> <item name="android:textColor">@color/white</item> </style> With this background image is got assigned but text

findViewById(android.R.id.progress) returns null

三世轮回 提交于 2019-12-05 05:58:43
The Android Developers reference lists R.id.progress among the built-in View resources available. Yet, when I issue (in my activity class) the statement: View pv = getWindow().findViewById(android.R.id.progress); It returns null. It returns null even when I use it in conjunction with the ProgressBar class: ProgressBar pv = (ProgressBar) getWindow().findViewById(android.R.id.progress); And it returns null even without the getWindow() : ProgressBar pv = (ProgressBar) findViewById(android.R.id.progress); Any idea why? To make sure I'm not hallucinating, I followed @Geobits's advice and created a

Center Action bar title

感情迁移 提交于 2019-12-04 19:38:39
How can I center activity's action bar title in Android? I've seen MANY questions on SO for this specific topic. And every answer comes back to "using custom view" and having your own toolbar. I've found a solution that works without creating a custom view. Have this method in your Activity : private void centerTitle() { ArrayList<View> textViews = new ArrayList<>(); getWindow().getDecorView().findViewsWithText(textViews, getTitle(), View.FIND_VIEWS_WITH_TEXT); if(textViews.size() > 0) { AppCompatTextView appCompatTextView = null; if(textViews.size() == 1) { appCompatTextView =

How to set the text color of titlebar?

青春壹個敷衍的年華 提交于 2019-12-04 12:12:04
I am using this as the theme. <style name="ThemeSelector" parent="android:Theme.Light"> <item name="android:windowTitleBackgroundStyle">@style/WindowTitleBackground</item> <item name="android:textAppearance">@style/TitleTextColor</item> </style> <style name="WindowTitleBackground"> <item name="android:background">@drawable/waterblue</item> </style> <style name="TitleTextColor"> <item name="android:textColor">@color/white</item> </style> With this background image is got assigned but text color is not changing. In manifest I am using like this. <application android:name="com.example" android