How can I configure how the header of an alert dialog

Is there a way to configure how the header of an alert dialog looks? It nows has an icon (on the left) with text as title. Is there a way to add view on the same line?

Thank you.


Asked by: Roland919 | Posted: 20-01-2022






Answer 1

As far as I know, you can't add an additional view to the title. However, you can use a custom title with AlertDialog.Builder.setCustomTitle(View). If you just wanted to replace the icon or text, you could use setIcon() or setTitle(), respectively.

Answered by: Kevin137 | Posted: 21-02-2022



Similar questions

layout - Android Views - How to Configure a "Loose" Piece of View Element Through XML?

This is what i'm trying to achieve: Use a TextView in a TabWidget (i.e. call TabHost.TabSpec.setIndicator(View) instead of TabHost.TabSpec.setIndicator(String)). And i want to configure that TextView in XML instead of building it programatically. So initially, in my layout XML, i had: <TabHost android:id="@+id/mainTabHost" ...


layout - Android Views - How to Configure a "Loose" Piece of View Element Through XML?

This is what i'm trying to achieve: Use a TextView in a TabWidget (i.e. call TabHost.TabSpec.setIndicator(View) instead of TabHost.TabSpec.setIndicator(String)). And i want to configure that TextView in XML instead of building it programatically. So initially, in my layout XML, i had: <TabHost android:id="@+id/mainTabHost" ...


android - Configure ambient media player source code in my eclipse?

Im trying to see working of ambient media player. I checkout from url https://ambientmp.svn.sourceforge.net/svnroot/ambientmp/Ambient/trunk to my eclipse work space. when build the app it is showing errors as Unbound classpath variable: 'M2_REPO/hotsax/hotsax/0.1/hotsax-0.1.jar' in project '...


android - How can I configure the color of the text in a dialog

In android selection dialog, like this example, http://labs.makemachine.net/2010/03/android-multi-selection-dialogs/ How can I specific the color of the text in the dialog? e.g. the color of the text "Mars", "Jupiter"?


Can't Configure Android SDK in Eclipse in Ubuntu After Upgraded to 10.10

I have installed eclipse 5.2 in ubuntu 10.10. In the 'Install New Software', it show Android Developments Installed. And when i goto preferences window, Android is not listed in the left panel. Already i was running Android SDK in ubuntu 10.04, after i upgraded ubuntu OS, eclipse is not showing the Android.


Is it possible to configure an Android install to run a single app?

Is it possible to configure the Android OS to run only a single app? Basically what I want to do is customize an Android device so that it boots up and runs one application only, and for that application to be switched to the front of the screen automatically. Also, when it gets closed, to be started up and switched to again. Any ideas? Thanks, -David


android - Help me configure OpenGL for 2D

I'm writing my first 2D app for Android using OpenGL. I'm writing it on my Desire, so my screen coords should be 0,0 to 799,479 in landscape mode. I'm trying to get OpenGL to use this range in world coordinates. The app, such as it is, is working fine so far, but I've had to tweak numbers to get stuff to appear on the screen and I'm frustrated by my inability to understand the relationship between the projecti...


java - CRest / How to configure to accecpt only JSON responce

I am using CRest to deserialize a JSON stream on Android. My first steps looks very promising. To get the JSON stream from the server and not the XML one I use the following construct: (Accept: application/json) @EndPoint("http://localhost:8080/myserver/rest") @Param(name = "Accept", value = "application/json", dest = Destination.HEADER) public interface VersionService { @Conne...


How to configure Android in Eclipse

can any one help me how to configure Android in Eclipse


java - How can I configure a SAX parser in the Sun JVM to match the Android one?

Is there a way to configure features/properties on the SAX parser so that it matches the default Android one? I have implemented a SAX parser for an Atom feed and I'd like to be able to unit test it without running it via an InstrumentationTestCase. The differences I see right away is that in startElement(), localName has the element name when running on Android, yet the "name" method parameter is populated when r...


memory leaks - How to configure an Android Virtual Device to work on my home computer

My computer confguration is: Processor: Interl Celeron 1.8 MHz RAM: 1 GB When I've run Android emulator it stuck in a cycle, because of lack of memory. How to setup it to run on my computer? Is there any chance? intepenit Thanks.






Still can't find your answer? Check out these communities...



Android Google Support | Android Community | Android Community (Facebook) | Dev.io Android



top