android-styles

Set EditText cursor color

被刻印的时光 ゝ 提交于 2019-11-25 23:32:49
问题 I am having this issue where I am using the Android\'s Holo theme on a tablet project. However, I have a fragment on screen which has a white background. I am adding an EditText component on this fragment. I\'ve tried to override the theme by setting the background of the Holo.Light theme resources. However, my text cursor (carat) remains white and hence, invisible on screen (I can spot it faintly in the edittext field..). Does anyone know how I can get EditText to use a darker cursor color?

Android toolbar center title and custom font

岁酱吖の 提交于 2019-11-25 22:41:25
问题 I\'m trying to figure out the right way to use a custom font for the toolbar title, and center it in the toolbar (client requirement). At the moment, i\'m using the good old ActionBar, and I was setting the title to empty value, and using setCustomView to put my custom font TextView and center it using ActionBar.LayoutParams. Is there a better way to do that? Using the new Toolbar as my ActionBar. 回答1: To use a custom title in your Toolbar all you need to do is remember is that Toolbar is

How do I change the background color of the ActionBar of an ActionBarActivity using XML?

人走茶凉 提交于 2019-11-25 21:58:40
问题 Details: I\'m extending ActionBarActivity. Eclipse and SDK fully patched as of 2011-11-06. <uses-sdk android:minSdkVersion=\"4\" android:targetSdkVersion=\"14\" /> Deployed to Samsung device with Android 2.3.3 Application has android:theme=\"@android:style/Theme.Light\" Issue: application is light, but ActionBar is blue with grey icons, hardly visible against the blue background color. I also want the ActionBar to be light, so they grey icons are more visible. I\'ve tried modifying the styles