test2




import android.content.Intent;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;


import com.wesoft.phinxaircon.R;
import com.wesoft.phinxaircon.adapter.SettingAdapter;
import com.wesoft.phinxaircon.util.SharedPreference;


import java.util.ArrayList;
import java.util.List;


public class SettingActivity extends BaseActivity implements
OnItemClickListener {
private static final String TAG = "SettingActivity";
private ListView settingListView;


@Override
protected void loadViewContent() {
setContentView(R.layout.setting);
findViewById();
setListener();
initView();
}


@Override
protected void findViewById() {
Log.v(TAG, "SettingActivity findViewById()");
// TODO Auto-generated method stub
settingListView = (ListView) this.findViewById(R.id.lv_setting);
Log.v(TAG, "settingListView ==" + settingListView);
}


@Override
protected void initView() {
Log.v(TAG, "SettingActivity initView()");
setTitle(R.string.setting);
List<String> settingList = new ArrayList<String>();
settingList.add("温度单位");
settingList.add("定时设置");
settingList.add("网络连接");
settingList.add("屏幕保护");
settingList.add("设备注册");
settingList.add("远程访问授权");
settingList.add("帮助&关于");


SettingAdapter adapter = new SettingAdapter(SettingActivity.this,
settingListView, settingList);
settingListView.setAdapter(adapter);


}


@Override
protected void setListener() {
settingListView.setOnItemClickListener(this);
}


@Override
protected void processLogic() {
// TODO Auto-generated method stub


}




/**
* 设置栏点击
*/
@Override
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
switch (position) {
//
// case 1:// 定时设置
// Intent timeSettingIntent = new Intent(this, TimingSetActivity.class);
// startActivity(timeSettingIntent);
// break;
// case 2://名称设定
// Intent nameSetIntent = new Intent(this, NameSetActivity.class);
// startActivity(nameSetIntent);
// break;
case 1:// 定时设置
Intent timeSettingIntent = new Intent(this, TimingSetActivity.class);
startActivity(timeSettingIntent);
break;
case 2:// 网络连接
Intent netConnectionIntent = new Intent(this,
NetConnectionActivity.class);
startActivity(netConnectionIntent);
break;
case 3:// 屏幕保护
Intent screenLockIntent = new Intent(this,
ScreenProtectSettingActivity.class);
startActivity(screenLockIntent);
break;
case 4:// 设备注册
Intent equipmentRegisterIntent = new Intent(this,
EquipmentRegisterActivity.class);
startActivity(equipmentRegisterIntent);
break;
case 5:// 远程授权
boolean auth_confirm_ok = SharedPreference.getBoolean(this,
"config", "auth_confirm_ok");
if (auth_confirm_ok) {
Intent authTimeCountdown = new Intent(this,
AuthTimeCountdownActivity.class);
startActivity(authTimeCountdown);
} else {
Intent authCenterIntent = new Intent(this,
AuthCenterActivity.class);
startActivity(authCenterIntent);
}


break;
// 帮助&关于
case 6:
Intent helpAndAboutIntent = new Intent(this,
HelpAndAboutActivity.class);
startActivity(helpAndAboutIntent);
break;
//
}
}


}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值