私の悪い英語でごめんなさい:)
最初のボタンのような他のボタンを作成する必要があります。 https://scontent-b-ams.xx.fbcdn.net/hphotos-frc1/v/577464_192010300985304_317054198_n.jpg?oh=bf0e536e576de63acf060604109797b0&oe=52777780
drawable フォルダーに shape_style.xml ファイルを作成しました
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#33B5E5" />
<padding android:left="7dp"
android:top="7dp"
android:right="7dp"
android:bottom="7dp" />
<corners android:radius="8dp" />
</shape>
色だけが異なる2番目のshape_style_2.xml
だから私は他のボタンのためにこれを行う必要がありますが、色だけが異なる10個のファイルを作成したくありません
私のlayout.xml
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<View
android:background="@drawable/shape_style"
style="@style/button_home_view" />
<TextView
style="@style/button_home_textview"
android:background="@drawable/shape_style_2"
android:text="@string/button_1" />
</FrameLayout>
この問題を解決するためのより良い方法はありますか?ありがとう