Ask how do RadioButton in RadioGroup in the upper right corner to add an extra digit to remind them? Similar micro-channel bottom navigation same.
Best to have examples. And I have this much difference, modify the time on the network is very complex! Thank you, ah
android: id = "@ + id / tab_radiogroup"
android: layout_width = "fill_parent"
android: layout_height = "wrap_content"
android: layout_gravity = "bottom"
android: gravity = "center_vertical"
android: orientation = "horizontal">android: id = "@ + id/fragment_radio1"
style = "@ style / tab_style"
android: layout_marginTop = "2.0dip"
android: drawableTop = "@ xml/main_tabbar1"
android: text = "@ string / str_tab_title_home" />android: id = "@ + id/fragment_radio2"
style = "@ style / tab_style"
android: layout_marginTop = "2.0dip"
android: drawableTop = "@ xml/main_tabbar2"
android: text = "@ string / str_tab_title_chat">
android: id = "@ + id/fragment_radio3"
style = "@ style / tab_style"
android: layout_marginTop = "2.0dip"
android: drawableTop = "@ xml/main_tabbar3"
android: text = "@ string / str_tab_title_contacts" />android: id = "@ + id/fragment_radio4"
style = "@ style / tab_style"
android: layout_marginTop = "2.0dip"
android: drawableTop = "@ xml/main_tabbar4"
android: text = "@ string / str_tab_title_friend" />android: id = "@ + id/fragment_radio5"
style = "@ style / tab_style"
android: layout_marginTop = "2.0dip"
android: drawableTop = "@ xml/main_tabbar5"
android: text = "@ string / str_tab_title_setting" />
private void change_Fragment () {
F_RadioGroup = (RadioGroup) findViewById (R.id.tab_radiogroup);
F_RadioGroup.setOnCheckedChangeListener (new OnCheckedChangeListener () {
@ Override
public void onCheckedChanged (RadioGroup group, int checkedId) {
/ / TODO Auto-generated method stub
transaction = fragmentManager
. BeginTransaction ();
switch (checkedId) {
case R.id.fragment_radio1:
Log.v (TAG, "click on the first one");
if (null == FragmentHome) {
FragmentHome = new Fragment_Home ();
}
transaction.replace (R.id.Main_content, FragmentHome);
transaction.addToBackStack (null);
transaction.commit ();
break;
case R.id.fragment_radio2:
Log.v (TAG, "click on the first two");
if (null == FragmentChat) {
FragmentChat = new Fragment_Chat ();
}
transaction.replace (R.id.Main_content, FragmentChat);
transaction.addToBackStack (null);
transaction.commit ();
break;
My current code is like this!<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
No comments:
Post a Comment