android - DialogFragment is not using my desired theme -


i have problem themes , styles in android when using different android versions.

so main problem have dialogfragment popping @ point in application , contains edittext. alertdialog created this:

alertdialog dialog =  new alertdialog.builder(getactivity())             .setpositivebutton ...  

and edittext created , added this:

editor = new edittext(getactivity()); dialog.setview(editor); 

on lollipop device, edittext has bottom line desired color. (c1 in list below).

but on android 4.3 device, has standard ugly blue bottom line.

my application has apptheme defines (among others) these items:

    <item name="colorprimary">@color/c1</item>     <item name="colorprimarydark">@color/c2</item>     <item name="coloraccent">@color/c3</item>      <item name="colorcontrolnormal">@color/c1</item>     <item name="colorcontrolactivated">@color/c2</item>     <item name="colorcontrolhighlight">@color/c3</item> 

the dialog fragments started activity inheriting app theme , i'm using regular getactivity() context.

so has experienced this? think should automatically use correct colors (through colorcontrolnormal, colorcontrolactivated , colorcontrolhighlight) ignored.

i'm using appcompat 22.2.0 btw.

thanks input on this!

i solved problem using android.support.v7.widget.appcompatedittext instead of regular edittext. use correct material design style.


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -