私の知る限り、レイアウトファイルに設定できるEditTextフィールドの周囲に影を落とすプロパティはありません。私は問題を探して、カスタムの背景xml drawableを提供するという解決策を見つけました。AndroidスタジオのEditTextの4辺に影を落とす
マイ描画可能/ background_with_shadowは次のようになります。
<?xml version="1.0" encoding="utf-8"?>
<layer-lis xmlns:android="http://schemas.android.com/apk/res/android">
<item >
<shape
android:shape="rectangle">
<solid android:color="@android:color/darker_gray" />
<corners android:radius="5dp"/>
</shape>
</item>
<item android:right="1dp" android:left="1dp" android:bottom="2dp">
<shape
android:shape="rectangle">
<solid android:color="@android:color/white"/>
<corners android:radius="5dp"/>
</shape>
</item>
</layer-list>
、それはちょうど下の周りに影を落とししかし、私はEditText
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background_with_shadow">
<EditText>
.
.
</EditText>
<LinearLayout>
が含まれている私のLinearLayout
ために、このプロパティを設定することだし、下隅。 4つの側面とコーナーではどうすればいいですか?
私はこれを達成しようとしている:あなたのLinearLayoutの背景として、このレイアウトを設定
nullに背景を作成してみます。このようなアンドロイド:背景= "@ヌル" ' –
申し訳ありません私の質問では言及しなかったが、私は' EditText'と白いバックラウンドが必要@ Jolson –
9パッチを使用してここで良いオプションがあります。 –