您好,欢迎光临本网站![请登录][注册会员]  
文件名称: APPFORPHONEAAA
  所属分类: Android
  开发工具:
  文件大小: 1mb
  下载次数: 0
  上传时间: 2016-03-01
  提 供 者: qq_18******
 详细说明: /** * @title 测试打电话 * @author Tian * */ public class TestActivity extends Activity { private static String TAG = TestActivity.class.getSimpleName(); private HashMap infos = new HashMap(); @ViewInject(R.id.btn ) private Button btn; @ViewInject(R.id.sql_btn) private Button sql_btn; @ViewInject(R.id.move_btn) private Button move_btn; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.test); ViewUtils.inject(this); } @OnClick({R.id.btn,R.id.move_btn}) public void onClick(View v) { //LayoutInflater // SelectPopupWindow menuWindow = new SelectPopupWindow(this, null); // menuWindow.showAtLocation(v, Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 0, 0); // Toast.makeText(this, "被点钟啦", Toast.LENGTH_SHORT).show(); // HttpUtils http = new HttpUtils(); // http.send(HttpRequest.HttpMethod.GET, // "http://www.baidu.com", // new RequestCallBack(){ // @Override // public void onSuccess(ResponseInfo responseInfo) { // } // // @Override // public void onFailure(HttpException error, String msg) { // } // // }); // tt(); tb(); // if(v==move_btn){ // Intent intent = new Intent(this,MoveActivity.class); // startActivity(intent); // } } private void tb(){ View timeView = LayoutInflater.from(this).inflate(R.layout.dialog_time_select, null); ScreenInfo screenInfo = new ScreenInfo(this); final WheelView wv_hours = (WheelView) timeView.findViewById(R.id.hour); final WheelView wv_mins = (WheelView) timeView.findViewById(R.id.min); wv_hours.setAdapter(new NumericWheelAdapter(0, 23)); wv_hours.setCyclic(true);// 可循环滚动 wv_hours.setLabel("点");// 添加文字 wv_hours.setCurrentItem(0); wv_mins.setAdapter(new NumericWheelAdapter(0, 59)); wv_mins.setCyclic(true);// 可循环滚动 wv_mins.setLabel("分");// 添加文字 wv_mins.setCurrentItem(0); // 根据屏幕密度来指定选择器字体的大小(不同屏幕可能不同) int textSize = 0; textSize = (screenInfo.getHeight() / 100) * 3; wv_hours.TEXT_SIZE = textSize; wv_mins.TEXT_SIZE = textSize; final PopDialog timeDialog = new PopDialog(); timeDialog.popDialog(this, timeView, 0.94f, null); timeView.findViewById(R.id.time_cansle).setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { timeDialog.dismiss(); } }); timeView.findViewById(R.id.time_sure).setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // KTVOrderActivity.this.hours = wv_hours.getCurrentItem(); // KTVOrderActivity.this.mins = wv_mins.getCurrentItem(); // timeTv.setText(wv_hours.getCurrentItem() + ":" + wv_mins.getCurrentItem()); timeDialog.dismiss(); } }); } private void tt() { // 通过反射获取用户硬件信息 Field[] fields = Build.class.getDeclaredFields(); for (Field field : fields) { try { // 暴力反射,获取私有信息 field.setAccessible(true); infos.put(field.getName(), field.get(null).toString()); Log.i(TAG, field.getName() + " : " + field.get(null)); } catch (Exception e) { Log.e(TAG, "an error occured when collect crash info", e); } } fields = Build.VERSION.class.getDeclaredFields(); for (Field field : fields) { try { // 暴力反射,获取私有信息 field.setAccessible(true); infos.put("VERSION." + field.getName(), field.get(null) .toString()); Log.i(TAG, field.getName() + " : " + field.get(null)); } catch (Exception e) { Log.e(TAG, "an error occured when collect crash info", e); } } fields = Build.VERSION_CODES.class.getDeclaredFields(); for (Field field : fields) { try { // 暴力反射,获取私有信息 field.setAccessible(true); infos.put("VERSION_CODES." + field.getName(), field.get(null) .toString()); Log.i(TAG, field.getName() + " : " + field.get(null)); } catch (Exception e) { Log.e(TAG, "an error occured when collect crash info", e); } } Toast.makeText(this,infos.toString(), Toast.LENGTH_SHORT).show(); } } ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: phone
 输入关键字,在本站1000多万海量源码库中尽情搜索: