enter image description hereリニアレイアウトでは、イメージビュー、テキストビュー、およびリニアレイアウトに関係なく編集テキストを使用しています。透明にする必要があるバックグラウンドでイメージを追加しようと思っています。しかし、背景画像だけがページ全体ではなく透明である必要があります。ページ内のデータの透明性に関係なく、Androidスタジオに透明な背景イメージを追加するにはどうすればよいですか?
1
A
答えて
0
私は私の意見では........
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:background="@drawable/download"
android:weightSum="2"
android:layout_height="match_parent">
<ImageView
android:layout_gravity="center"
android:src="@drawable/download"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="0dp" />
<LinearLayout
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="0dp">
<TextView
android:text="@string/dummy_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
-1
を理解するもの、によると、あなたのデザインがをアピール本当にではありません。テキストが読めないあなたの例では
が、それは同じ画面に二回イメージを持ってしても意味がありません、背景画像は、がを伸ばして正面画像がそう小さなです。
は、あなたがここで、このようにそれを好きならヨーヨーは、XML定義があります:私はかなりの質問を理解していない
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dp">
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Taj Mahal"
android:layout_marginBottom="5dp"
android:textSize="24sp"/>
<View
android:layout_height="2dp"
android:layout_width="match_parent"
android:background="#aaaaaa"/>
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:padding="10dp"
android:scaleType="fitXY"
app:srcCompat="@drawable/taj_mahal"/>
<View
android:layout_height="2dp"
android:layout_width="match_parent"
android:background="#aaaaaa"/>
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="The Taj Mahal is an ivory-white marble mausoleum on the south bank of the Yamuna river in the Indian city of Agra. It was commissioned in 1632 by the Mughal emperor, Shah Jahan (reigned 1628–1658), to house the tomb of his favourite wife."
android:textSize="18sp"/>
</LinearLayout>
関連する問題
- 1. GLSurfaceviewの上に透明な背景をアンドロイドで追加するにはどうすればいいですか?
- 2. 透明な背景でテキストも透明になります
- 3. ページの背景を透明にする
- 4. どのページの透明な背景を設定するには
- 5. 透明な背景
- 6. C#Windowsフォームの透明な背景イメージ
- 7. KitKatの透明な背景イメージ(Drawable)4.4.2
- 8. 透明でない背景に透明なテキストを作成する方法
- 9. 透明なdivに背景画像を追加する
- 10. 透明なイメージを背景イメージに置き換えます。
- 11. JTextPaneの背景が透明になるようにする
- 12. 透明な背景のアーティファクト
- 13. 透明なボタンの背景
- 14. 透明なウィジェットの背景?
- 15. 透明な背景のみ
- 16. IEの透明な背景
- 17. UITextViewの透明な背景
- 18. 透明なモーダルの背景
- 19. 透明な背景を持つ透明な背景でムービーを作る方法
- 20. 透明なDirectXコンテンツを透明なウィンドウに描画するにはどうすればよいですか?
- 21. Android GLSurfaceView透明な背景setZOrderonTopなし
- 22. Android用Flex Airの透明な背景?
- 23. Androidのアクティビティ透明な背景
- 24. コンテンツ(画像とテキスト)を透明にしなくても、ウェブサイトの背景を透明にするにはどうすればいいですか?
- 25. 背景色の前にホバーの透明な背景イメージを変更する
- 26. カスタムビットマップボタンのフィールドを透明な背景にするにはどうすればよいですか?
- 27. ブートストラップモードの透明な背景の不透明なテキスト
- 28. 背景画像に透明度の不透明度を追加しようとしています
- 29. フラッシュ透明な背景には、Mac
- 30. ボタンの透明な背景はどうですか?
を
私はあなたがこのようなものを使用ことをお勧め。あなたは現在の結果と希望の効果のイメージを表示できますか? – JonZarate
iveは現在の画像をアップロードしていますが、透明度25%の背景画像として2枚目の画像を最初の画像に入れたいだけで、他の画像はページの半分をカバーし、 –