I want to hide the title bar for some of my activities. The problem is that I applied a style to all my activities, therefore I can't simply set the theme to @android:style/Theme.NoTitleBar. Using the NoTitleBar theme as a parent for my style would remove the title bar for to much activities. Can I set a no title style item somewhere?
Is it possible to remove a title bar in a window after content has been set? Calling the method Activity.requestWindowFeature (Window.FEATURE_NO_TITLE) ends up in the exception: "requestFeature() must be called before adding content".
Just trying to get a confirmation, has anyone else found that since updating to 2.2 the following line has no effect: requestWindowFeature(Window.FEATURE_NO_TITLE);. Is there a new permission required?
I am using a custom title view in my application for each activity. In one of the activities, based on button clicks I need to change the custom title view. Now this works fine every time when I make a call to setFeatureInt.
But if I try to update any items in the custom title (say change the text of a button or a text view on the title), the update does not take place.
Debugging through the code shows that the text view and button instances are not null and I can also see the custom title bar. But the text on the text view or the button is not updated. Has anyone else faced this problem? How do I resolve it?
I have an activity with the dialog theme applied to it. I am setting the dialog title, but the string is quite long, and instead of wrapping, it just gets truncated. Is there a way to wrap the title instead?
I'm using a theme for my app to set some common layout features. One of the things I change in this theme is the text style. I change the color and the size of the text in the whole app. Sadly the text in the titlebar is also changed and the result is a somewhat blurry ugly style. I don't know if it is the color or the size of the text. Is it possible to somehow overwrite the style for the title in the theme? Or exclude the title?
I've extended Theme.Dialog to use a different color as per the sample in the ApiDemos project but for some reason it does not use the theme properly in my project. I created a new project and it works perfectly fine there. The main problem here is that it does not show as floating in my project. Instead, it sets the rest of the screen black except for what would be the dialog window, where it uses the correct colors, etc. Any ideas? I am beating my head against the wall here.
Just a quick question, is there a way, with out installing a theme or Home replacement, to remove the text under the icons, so its just an icon only? also, is there a way to hide the notification area? I thought it would be cool to tap the screen once, and have the batter/time/date/notification area drop down from the top like how it is right now with the stock version, then tap the screen again and it hides the notification area. Wouldn't that be cool? Any way to do this or does something do this already?
I encounter a problem with a ProgressDialog in a PreferencesActivity in my application.What I want to do is pop up a ProgressDialog after the user has changed his username or password during the check on the remote server. In the onSharedPreferenceChanged() I call the ProgressDialog.show() method. Sometimes it works fine, sometimes not at all.
I have a custom title bar that I would like to apply to all my activities. I have searched online and found a few ways of doing that however I have ran into a problem. It seems that despite the fact I have a TextView in my titlebar with id @android:id/title, Android will not use the value defined in the manifest in android:label for each activity. I tried also calling setTitle(R.string.myTitle) but it still will not render it! If I manually put some text in my TextView in the xml it shows up fine. How can I have a custom title bar that is linked and makes Android use my manifest values for labels? I do not want to lose the setTitle() or the XML attributes functionality.
I am using a custom title view and would like to show/hide a progressbar in the title view when a thread is working.But there is no change to the progress bar. It is never displayed. Can someone please tell me what is wrong with the code?Is it possible to display the title progressbar in a custom title?
I'm setting up an app to use a custom title so I can get the proper logo into the title instead of just text, and to make it clean (since the logo has a flat black background), I also want the whole title bar to be black. My xml for the title is a framelayout to hold the logo inside of a linearlayout to change the background color, and I'm setting the title in OnCreate() as follows:
With this setup, the old gray from the old title bar still exists around the edge of my custom title. Appears to be on the order of 3-4 px on the bottom and 8-10 px on each side. Any ideas about how to get the black background to cover the entire area?
I am having issues with my droid. I flashed Cyanogenmod 6.0 RC2. But now I am unable to flash any themes or other roms, all I get is error messages on reboot. I am able to restore previous backups but even when I do that I still have the same issue of not being able to flash a theme or rom. That is using rom manager or manually.
I'm trying to open a dialog window, but every time I try to open it it throws this exception:
I'm creating it by calling showDialog with the display's id. The onCreateDialog handler logs fine and I can step through it without an issue, but I've attached it since it seems like I'm missing something:
Is there something missing from this? Some questions have talked about having this problem when creating a dialog from onCreate, which happen because the activity isn't created yet, but this is coming from a call from a menu object, and the appContext variable seems like it is correctly populated in the debugger.
What is the basic difference between the PhoneWindow and MidWindow policies? I found that the emulator version takes the implementations of the PhoneWindow.When the MidWindow implementations will be used? Also, I found that PhoneWindow handles the call settings implementation and the same is not there in MidWindow? Please someone help me pointing out the differences between both the policies and under which circumstances which one will be used.
I'm trying to create a basic AlertDialog using an activity with a theme of Theme.Dialog.What I want is for there to be a horizontal bar between the title and the message. However, the bar is not being resized correctly. Rather than being the width of the activity, the bar is the width of the message text. This means that if the activity is being expanded by the message, then the bar will fill the whole activity, so it looks correct. However, if the message width is less than the activity width, the bar only displays above the part of the activity with the text. I've tried every single combination of "fill_parent" and "wrap_content" that I can think of, and none of those work.I've also tried using RelativeLayout and placing the bar above the message text, but that also doesn't work. If I use the RelativeLayout approach and set the bar to fill_parent, it causes the activity to expand to fill the whole screen width, which is also undesirable. Ideally, I want the text placed, the activity width computed, and the bar resized to that width (without affecting it). Is there some way to flag a view to fill the parent view but not to affect its size?
I use themes in my apps, which generally just extend android:Theme and then set a bunch of styles. I use dialogs made from layouts, but since I set the theme for the application, they have inherited all of the regular styles and no longer carry a border, etc. My question is: How do I say, "I want everything to use this theme which extends Theme, except dialogs, which should use this other theme that extends Theme.Dialog"? It seems like that's how things work by default but when you set the theme to your own, you lose the dialog theme!
What is "window.demo.clickOnAndroid()"? I know that clickOnAndroid is a method in my Android application. But what is window and demo? My file is called demo.html. Is that it?
In one of my Android Application I need to keep the title bar same but the view that is shown in the rest of the screen changes. So, I have taken different Activity for all the views that I need to show and set the title bar in every Activities onCreate method. Now, the problem is that I have a button in the title bar and need to perform certain action on its click event. Writing the same event handling code in every Activity class is very cumbersome. Is there any other way out that whenever there is a click event on that button of the title bar then we can have the same functionality without writing the same code in all the Activity classes. Can we use ViewGroup for that? I don't have much idea about ViewGroup. Is that possible with ViewGroup?
When my application starts, I call: this.requestWindowFeature(Window.FEATURE_NO_TITLE); to get rid of the title bar. I then create a custom ViewGroup and when set that view to be the content view via a call to 'setContentView', the 'onLayout' method of my ViewGroup is called. However, the top position is set to 25, even though I have turned off the title. How can I set my ViewGroup to take up all of the space, including the space formally occupied by the title bar?
I have a possible simple layout questions. My activity content view contains a title bar, a webview and a status bar. I put these three views into a linearlayout and each has height as WRAP_CONTENT.
The problem is, when first displays, webview doesn't take much space because the page is not loaded. The status bar is showed right under title bar. When the page is loaded, webview expands over the screen size and the status bar is not shown even when scroll down to the button. (I tried to set webView's height to FILL_PARENT, but status bar is not shown)
What is the correct way I can layout this so the title bar always at the top, the status bar always at the bottom and webview always take the remaining middle space and have scroll bar when contents takes larger space?