カスタム ダイアログ設定のレイアウトにシークバーがあります。新しいマテリアル デザインを使用するように、styles.xml を変更しました。設定のテキストとチェックボックスが変更されるため機能しますが、シークバーに色を適用できません。アクティビティにシークバーを配置した場合にのみ機能します。これは、カスタム レイアウトで何かをしなければならないことを意味しますが、何がわかりません。styles.xml とシークバー付きのレイアウトを投稿します。
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppBaseTheme" parent="android:Theme.Material">
<!-- Main theme colors -->
<!-- your app's branding color (for the app bar) -->
<item name="android:colorPrimary">#FFFF4444</item>
<!-- darker variant of colorPrimary (for status bar, contextual app bars) -->
<item name="android:colorPrimaryDark">#FFCC0000</item>
<!-- theme UI controls like checkboxes and text fields -->
<item name="android:colorAccent">#FFFF00</item>
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
</style>
</resources>
ダイアログ設定のカスタム レイアウト:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<SeekBar
android:id="@+id/seek_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="6dip"
android:theme="@android:style/Theme.Material"
android:layout_marginTop="6dip" />
</LinearLayout>