Fav*_*las 3 android android-alertdialog
我有一个自定义alertdialog,膨胀这个自定义布局:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/infoLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:theme="@style/AppTheme" >
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:weightSum="2" >
<TextView
android:id="@+id/infoVersionTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right|center"
android:text="@string/infoVersion"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/infoVersionTitleValue"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
<TextView
android:id="@+id/infoDetailText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/linearLayout1"
android:padding="10dp" />
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
我在我的清单文件中有这个:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
........
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
Run Code Online (Sandbox Code Playgroud)
我已经通过这种方式定义了style.xml:
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AppTheme" parent="android:Theme.Light"></style>
</resources>
Run Code Online (Sandbox Code Playgroud)
style.xml v11定义如下:
<resources>
<style name="AppTheme" parent="android:Theme.Light"></style>
</resources>
Run Code Online (Sandbox Code Playgroud)
而style.xml v14的定义如下:
<resources>
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar" />
</resources>
Run Code Online (Sandbox Code Playgroud)
在4.0.3设备上运行时,它显示如下:

并在2.3.3设备上运行它显示如下:

在2.3.3设备上,文本几乎不可读,我想显示白色背景(包括标题栏)
是否可以在4.0.3上显示的所有设备上显示自定义alertdialog?
我已经看到了这个,但似乎无法弄明白.
有解决方案吗
| 归档时间: |
|
| 查看次数: |
2595 次 |
| 最近记录: |