android - ID of top divider in AlertDialog -


I am using the following code on my Alert Deals topic.

  resource resources = dialog .getContext () getResources () .; Int color = resources.getColor (R.color.green_theme); // Your Color Here EntourTitid = resources.getIdentifier ("alertTitle", "id", "android"); TextView AlertTitle = (TextView) dialog.GetVindo (). GetDecorView (). FindViewById (WarningTilayed); AlertTitle.setTextColor (color); // Change title text color int titlesdividerID = resources.getIdentifier ("titledivider", "id", "android"); View Title + Divider = Dialog.GetWondo (). GetDecorView (). FindViewById (titleDividerId); TitleDivider.setBackgroundColor (color); // change split color   

This works well, except for the case where I have an alert dialog with no message but no title, it appears that a third Is the scene which is only displayed in this case, which also requires its color set. I do not know what the id's ID is. Does anyone know this?

The scene I'm talking about has highlighted the white rectangle in the picture below.

alertdiology

I think nobody has really read my question.

Anyway, the answer is if someone else has the problem:

  int titleDividerTopId = resources.getIdentifier ("titleDividerTop", "id", "android" ); See title DIVIDERTOR = DialogGetWindow (). GetDecorView (). FindViewById (titleDividerTopId); TitleDividerTop.setBackgroundColor (color);    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -