安全知识普及系统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>
标签:普及,Intent,知识,private,安全,intent,new,TextView,View 来源: https://www.cnblogs.com/shiwuzu/p/16376208.html