ホーム > タグ > Button
Button
[Android] ボタンの見た目をカスタマイズ
- 2012-05-12 (土)
- Android
規定のボタンデザインを使ってもいいのですが、物足りなく感じることはないでしょうか?
どうせ自作アプリを作るなら、ボタンもオリジナルの見た目にしたいですよね。
そこで、今回はボタンの見た目を変更する方法について。
背景色の変更
android:background属性に背景色を指定するだけでも見た目がガラっ(?)と変わります。
1 | <? xml version = "1.0" encoding = "utf-8" ?> |
2 | < LinearLayout xmlns:android = "http://schemas.android.com/apk/res/android" |
3 | android:layout_width = "fill_parent" |
4 | android:layout_height = "fill_parent" |
5 | android:orientation = "vertical" > |
6 | < Button |
7 | android:layout_width = "100dp" |
8 | android:layout_height = "40dp" |
9 | android:background = "#00FF00" |
10 | android:text = "Hoge" /> |
11 | </ LinearLayout > |
- Comments: 0
- Trackbacks: 0
Home > Tags > Button
- Search
- Feeds
- Meta
- 人気の記事