手机防盗的功能我们已经完成的啦,里面有挺多知识点的,大家最好总结一下。或再看看是怎样写的。
好啦,今天我们的任务比较简单,就是把手机归属地查询的界面做出来而已,逻辑我们明天才完成,这一次,我们就不会通过WebService来获得手机的归属地的啦,我们直接把数据库嵌入到的我们的应用里面,这个我们就明天再说啦,今天先把界面做好
com.xiaobin.security.ui.AToolActivity
- package com.xiaobin.security.ui;
-
- import android.app.Activity;
- import android.content.Intent;
- import android.os.Bundle;
- import android.view.View;
- import android.view.View.OnClickListener;
- import android.widget.TextView;
-
- import com.xiaobin.security.R;
-
- public class AToolActivity extends Activity implements OnClickListener
- {
- private TextView tv_atool_query;
-
- @Override
- protected void onCreate(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.atool);
-
- tv_atool_query = (TextView) findViewById(R.id.tv_atool_query);
- tv_atool_query.setOnClickListener(this);
- }
-
- @Override
- public void onClick(View v)
- {
- switch(v.getId())
- {
- case R.id.tv_atool_query :
- Intent intent = new Intent(this, QueryNumberActivity.class);
- startActivity(intent);
- break;
-
- default :
- break;
- }
- }
-
- }
-
复制代码
atool.xml
com.xiaobin.security.ui.QueryNumberActivity
- package com.xiaobin.security.ui;
-
- import android.app.Activity;
- import android.os.Bundle;
- import android.view.View;
- import android.widget.Button;
- import android.widget.EditText;
- import android.widget.TextView;
-
- import com.xiaobin.security.R;
-
- public class QueryNumberActivity extends Activity
- {
- private TextView tv_result;
- private EditText et_query_number;
- private Button bt_query;
-
- @Override
- protected void onCreate(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.query_number);
-
- tv_result = (TextView) findViewById(R.id.tv_query_result);
- et_query_number = (EditText) findViewById(R.id.et_query_number);
- }
-
- public void query(View v)
- {
-
- }
-
- }
-
复制代码
query_number.xml
好啦,今天的都是界面的问题而已我们明天才会把逻辑进行完善,其中包括数据库的压缩啦,使它的体积减少

Security_12手机号码归属地的界面.rar (2.62 MB, 下载次数: 124)