NumberPicker在Theme.AppCompat.Light上显示深色背景

时间:2016-07-10 06:14:22

标签: android xamarin xamarin.android

我已将Theme.AppCompat.Light应用于我的应用。除了数字选择器(包括日期/时间选择器)之外,所有UI组件都以灯光主题显示。结果如下。 axml代码也在下面。如何使用浅色主题获得数字选择器。

CREATE TABLE TestData ( id1 int, id2 int, id3 int, id4 String) ROW FORMAT DELIMITED FIELDS TERMINATED BY ‘,’ stored as textfile;

enter image description here

1 个答案:

答案 0 :(得分:0)

替换Theme.AppCompat.Light代替Theme.Holo.Light

通过清单:

<application android:allowBackup="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:theme="@style/Theme.AppCompat.Light"></application>

通过Manifest Property Editor:

enter image description here

活动级别Theme.AppCompat.Light

[Activity(Label = "AppCompatLight", MainLauncher = true, Icon = "@mipmap/icon", Theme = "@style/Theme.AppCompat.Light")]
public class MainActivity : ActionBarActivity

结果:

enter image description here

活动级别Theme.Holo.Light

[Activity(Label = "ThemeLight", MainLauncher = true, Icon = "@mipmap/icon", Theme = "@android:style/Theme.Holo.Light")]

申请级别Theme.Holo.Light

通过清单:

<application android:allowBackup="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:theme="@android:style/Theme.Holo.Light"></application>

通过Manifest Property Editor:

enter image description here

结果:

enter image description here