私は、ユーザーが配色を変更できるアプリケーションを作成したいと思います。私はImagebuttonsを持っていて、ボタンの画像はpngで透明な背景を持っています。しかし、私はそれらをボタンに置くとき、もう透明ではありません。誰かが私にいくつかのコードを教えてくれますか?感謝! ありがとう! アンAndroid ImageButton:透明な背景を持つ画像
1
A
答えて
4
android:background="@null"
が確実に設定されていますか?それ以外の場合は、グレーのボタンの背景があります。たとえば:
<ImageButton
android:background="@null"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/my_transparent_png"
/>
0
はようImageButton
のためのあなたのレイアウトを記述します。
<ImageButton
android:src="@drawable/your_image"
android:id="@+id/your_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/transparent"/>
・ホープこのことができます!
関連する問題
- 1. @null背景(透明)のimagebutton
- 2. Android透明ウィジェット背景画像
- 3. ランタイムImageButtonと透明な背景のエラー
- 4. ドロップシャドウと透明な背景を持つ画像をコピーする
- 5. 透明な背景を持つ画像をPython PILライブラリ
- 6. 画像背景透明GIMP
- 7. Launchscreen.storyboardの透明な背景を持つ画像
- 8. トリプルプレイボタン:透明な背景の画像ボタン
- 9. 透明な画像 - 背景色
- 10. 複数の透明な背景画像
- 11. 透明な背景を持つBottomSheetDialog
- 12. 不透明な描画と透明な背景を持つUIImageView描画
- 13. 透明な背景を持つDialogFragment
- 14. 透明な背景を持つ透明な背景でムービーを作る方法
- 15. 背景色を透明な背景画像で表示する
- 16. 透明な背景を持つWebkitスクロールバー
- 17. 透明な背景を持つmplot3dアニメーション
- 18. 透明な背景を持つLWJGLウィンドウ?
- 19. 透明な背景を持つWebView
- 20. 透明な背景を持つモーダルUISplitViewController
- 21. WideImage - 透明な背景を持つキャンバス
- 22. 背景画像の透明度DIV
- 23. 背景画像の不透明アニメーション
- 24. 背景画像angacity2の不透明度
- 25. 透明画像の背景HTML5のキャンバス
- 26. 透明な背景を持つ再描画イメージ
- 27. 透明な背景を持つPNG画像をCSSに含めるには
- 28. 透明な背景を持つAndroidの円形進行
- 29. Android:アクティビティで背景色と半透明の背景画像を設定する
- 30. 画像フィルタはあるが透明な背景を持つSVGパス