In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
In this article, the editor introduces in detail "how to achieve the registration page for Android", the content is detailed, the steps are clear, and the details are handled properly. I hope this "how to achieve registration page for Android" article can help you solve your doubts.
The effect picture of the implementation:
Code:
Package com.example.project309; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle;import android.view.View;import android.widget.Button;import android.widget.CheckBox;import android.widget.EditText;import android.widget.RadioButton;import android.widget.TextView; public class MainActivity extends AppCompatActivity {EditText name; EditText password; RadioButton man; RadioButton woman; Button show; TextView shower; CheckBox auto; CheckBox remember; String result= "" Override protected void onCreate (Bundle savedInstanceState) {super.onCreate (savedInstanceState); setContentView (R.layout.activity_main); name = findViewById (R.id.name); password = findViewById (R.id.password); man = findViewById (R.id.man); woman = findViewById (R.id.woman); show = findViewById (R.id.show); shower = findViewById (R.id.shower) Auto = findViewById (R.id.auto); remember = findViewById (R.id.remember); show.setOnClickListener (this::onClick);} public void onClick (View v) {String user = name.getText (). ToString (); result + = "name:" + user+ "\ n"; String pass = password.getText (). ToString (); result + = "password:" + pass+ "\ n" If (man.isChecked ()) {result+= "gender:" + man.getText (). ToString () + "\ n" + "setting:";} if (woman.isChecked ()) {result+= "gender:" + woman.getText (). ToString () + "\ n" + "setting:" } if (auto.isChecked ()) {result+=auto.getText () .toString () + ";} if (remember.isChecked ()) {result+=remember.getText () .toString () +";} shower.setText (result);}}
XML:
After reading this, the article "how to realize the registration page for Android" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.