Skip to content

Commit

Permalink
婴儿界面首页
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhoujunAndroid committed Nov 6, 2013
1 parent 87af7af commit 952f025
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion baby/src/com/keju/baby/activity/baby/MainBabyActivity.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
package com.keju.baby.activity.baby;

import java.util.Timer;
import java.util.TimerTask;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.RadioButton;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;
import android.widget.Toast;

import com.keju.baby.CommonApplication;
import com.keju.baby.R;
import com.keju.baby.activity.SettingActivity;
import com.keju.baby.util.AndroidUtil;

/**
* 婴儿tabhost界面
Expand Down Expand Up @@ -77,6 +83,29 @@ private void fillData() {
}
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {

switch (buttonView.getId()) {
case R.id.rb_home:
if(isChecked){
mth.setCurrentTabByTag(HOME_TAB_ID);
}
break;
case R.id.rb_account:
if(isChecked){
mth.setCurrentTabByTag(ACCOUNT_TAB_ID);
}
break;
case R.id.rb_fitment:
if(isChecked){
mth.setCurrentTabByTag(FITMENT_TAB_ID);
}
break;
case R.id.rb_setting:
if(isChecked){
mth.setCurrentTabByTag(SETTING_TAB_ID);
}
break;
default:
break;
}
}
}

0 comments on commit 952f025

Please sign in to comment.