安全知识普及系统3

临时增加了密码遗忘找回的功能,但没有实现,另外就是完成了底部导航栏实现页面跳转的功能。

复制代码
public class MainPageActivity extends AppCompatActivity {

    private RadioButton mRadioButtonmsg;
    private RadioButton mRadioButtonmain;
    private RadioButton mRadioButtonme;

    private TextView mprc1;
    private TextView mprc2;
    private TextView mprc3;
    private TextView mprc4;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_page);

        mRadioButtonmsg = (RadioButton) findViewById(R.id.rb_msg);
        mRadioButtonmain = (RadioButton) findViewById(R.id.rb_main);
        mRadioButtonme = (RadioButton) findViewById(R.id.rb_me);
        mprc1 = (TextView) findViewById(R.id.xiaofangprc);
        mprc2 = (TextView) findViewById(R.id.yongdianprc);
        mprc3 = (TextView) findViewById(R.id.anquanprc);
        mprc4 = (TextView) findViewById(R.id.wangluoprc);

        mRadioButtonme.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View view) {
                //跳转到个人资料界面
                Intent intent = new Intent(MainPageActivity.this,MymessageActivity.class);
                startActivity(intent);
            }
        });

        mRadioButtonmsg.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View view) {
                //跳转到收藏界面
                Intent intent = new Intent(MainPageActivity.this,ShoucangActivity.class);
                startActivity(intent);
            }
        });

        mprc1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(MainPageActivity.this,xiaofangActivity.class);
                startActivity(intent);
            }
        });

        mprc2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(MainPageActivity.this,electActivity.class);
                startActivity(intent);
            }
        });

        mprc3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(MainPageActivity.this,schoolActivity.class);
                startActivity(intent);
            }
        });

        mprc4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(MainPageActivity.this,internetActivity.class);
                startActivity(intent);
            }
        });



    }
}
复制代码
复制代码
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:padding="20dp">

    <EditText
        android:id="@+id/phonenumupdate"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="100dp"
        android:hint="手机号"
        android:textSize="35sp"
        />

    <EditText
        android:id="@+id/oldpsw"
        android:inputType="textPassword"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dp"
        android:hint="原密码"
        android:textSize="35sp"
        />

    <EditText
        android:id="@+id/UDpsw1"
        android:inputType="textPassword"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dp"
        android:hint="输入新密码"
        android:textSize="35sp"
        />


    <EditText
        android:id="@+id/UDpsw2"
        android:inputType="textPassword"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dp"
        android:hint="确认密码"
        android:textSize="35sp"
        />

    <Button
        android:id="@+id/updatebutton"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dp"
        android:background="@drawable/btn_type1"
        android:text="确认"
        android:textSize="35sp"
        />

</LinearLayout>
复制代码

 

posted @   海底小分队  阅读(19)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 提示词工程——AI应用必不可少的技术
· 字符编码:从基础到乱码解决
· 地球OL攻略 —— 某应届生求职总结
点击右上角即可分享
微信分享提示