[問題] RadioButton對齊問題?
最近我在做生活用的APP
跟大多數APP一樣下方有按鈕可以使用
但是我採用的是RadioButton去做
但是我碰到一個問題
就是我給每一個Button套好style的時候
想要再調整間距..他的圖片卻往左靠..
怎麼調整都一樣...
後來就直接修改圖片的大小去座間距了..
我有試著使用rameLayout去排版
這樣就可以強制圖片置中又可以調整間距了..
但是這樣做我的Button會沒有任何反應..
一定要把Button套到RadioGruop下才會有反應..
也就是說在RadioGroup與RadioButton中間有格Layout就會造成BUG?
<RadioGroup
android:id = "@+id/radioGroup1"
android:layout_width = "match_parent"
android:layout_height = "wrap_content"
android:background = "@color/gray_percent"
android:orientation = "horizontal" >
<FrameLayout
android:layout_width = "0dip"
android:layout_height = "wrap_content"
android:layout_weight = "1" >
<RadioButton
android:id = "@+id/radio0"
android:layout_width = "wrap_content"
android:layout_height = "wrap_content"
android:layout_gravity = "center_horizontal"
android:button = "@drawable/rb_temp1"
android:checked = "true"
android:gravity = "center" />
</FrameLayout>
<FrameLayout
android:layout_width = "0dip"
android:layout_height = "wrap_content"
android:layout_weight = "1" >
<RadioButton
android:id = "@+id/radio0"
android:layout_width = "wrap_content"
android:layout_height = "wrap_content"
android:layout_gravity = "center_horizontal"
android:button = "@drawable/rb_temp1"
android:gravity = "center" />
</FrameLayout>
</RadioGroup>
有沒有鄉民能給些建議呢?
--
ボ ◢ ◥══◢ ◥═══◢ ◥◣ ══◥◣◢◤◣═ ◣◢═Vocaloid╮
║ ◣ ◤◥ ◢◢◢▼ quetzal◤◥◥﹨◣ ◢◥◤ ◥ ▼◥ ◣◢ ║
║ ● ●▼ ● ●◥ ロ ● ● ;│ ▼◥︽﹨ ◆▼◥▼﹨ ▃▃
║ ◣▄ ◢◤ ◤◣▆ ◢◥ ◥◣▃ ▉◤ ═● ● ▌ ◤● ● ▌ ◢ド!
║ ◤◤◢ ◣ カ ████▆≡ ◤▆ ◥ ◢◣▁ ▉◥ ◣▄ ▉◤ ▅▅
╰══◣︶●═══ ▊█▎◥◣══▼ ◢/△ ◤═イ═△▅/◥══ △▅/◣ ═══╯
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.34.164.154
→
02/21 00:55, , 1F
02/21 00:55, 1F
→
02/21 09:43, , 2F
02/21 09:43, 2F
→
02/21 09:44, , 3F
02/21 09:44, 3F
→
02/21 10:34, , 4F
02/21 10:34, 4F
→
02/21 10:45, , 5F
02/21 10:45, 5F
→
02/21 10:45, , 6F
02/21 10:45, 6F
→
02/21 10:46, , 7F
02/21 10:46, 7F
→
02/21 13:32, , 8F
02/21 13:32, 8F
→
02/21 13:33, , 9F
02/21 13:33, 9F
→
02/21 14:49, , 10F
02/21 14:49, 10F