On android applications EditText box is applied to demand text from user, text can be any type of
Alphabetic ( A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z )
Numeric ( 0,1,2,3,4,5,6,7,8,9 )
Special symbols ( ! @ # $ % ^ & * ( ) _ + { } " : ? > < | ) .
EditText box also used to get password from user into android application. Because password is very protective thing and when you enter your password in some one's front you don't want to recognize them your password so android EditText gives us an attribute property to take password from user into android application with showing * ( Star ) symbol every time key enters a password.
Alphabetic ( A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z )
Numeric ( 0,1,2,3,4,5,6,7,8,9 )
Special symbols ( ! @ # $ % ^ & * ( ) _ + { } " : ? > < | ) .
EditText box also used to get password from user into android application. Because password is very protective thing and when you enter your password in some one's front you don't want to recognize them your password so android EditText gives us an attribute property to take password from user into android application with showing * ( Star ) symbol every time key enters a password.
How to get Alphabet + Numeric + Special symbol as password in android app using EditText.
Code for MainActivity.java file .
package com.tutorials2make.edittextgetpassword;
import android.app.Activity;
import android.os.Bundle;
import android.text.Editable;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class MainActivity extends Activity {
Editable getPassword;
Button GetTextPassword;
EditText EntertextPassword;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
GetTextPassword = (Button)findViewById(R.id.get_password_in_android);
EntertextPassword = (EditText)findViewById(R.id.EnterPasswordBoxInAndroid);
GetTextPassword.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
getPassword = EntertextPassword.getText();
Toast.makeText(MainActivity.this, getPassword,Toast.LENGTH_SHORT).show();
}
});
}
}
Code for activity_main.xml file .
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.tutorials2make.edittextgetpassword.MainActivity" >
<EditText
android:id="@+id/EnterPasswordBoxInAndroid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="83dp"
android:ems="10"
android:inputType="textPassword" >
<requestFocus />
</EditText>
<Button
android:id="@+id/get_password_in_android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="Click Here to obtain Password form application user" />
</RelativeLayout>
android application development is one of the most powerful technology. Requiring a strong password from the user is verty good strategy to secure users accounts and data.
ReplyDeleteHaloo pak^^
ReplyDeleteKami dari SENTANAPOKER ingin menawarkan pak^^
Untuk saat ini kami menerima Deposit Melalui Pulsa ya pak.
*untuk minimal deposit 10ribu
*untuk minimal Withdraw 25ribu
*untuk deposit pulsa kami menerima provider
-XL
-Telkomsel
untuk bonus yang kami miliki kami memiliki
*bonus cashback 0,5%
*bunus refferal 20%
*bonus gebiar bulanan (N-max,samsung Note 10+,Iphone xr 64G,camera go pro 7hero,Apple airpods 2 ,dan freechips)
Daftar Langsung Di:
SENTANAPOKER
Kontak Kami;
WA : +855 9647 76509
Line : SentanaPoker
Wechat : SentanaPokerLivechat Sentanapoker
Proses deposit dan withdraw tercepat bisa anda rasakan jika bermain di Sentanapoker. So… ? tunggu apa lagi ? Mari bergabung dengan kami. Pelayanan CS yang ramah dan Proffesional dan pastinya sangat aman juga bisa anda dapatkan di Sentanapoker.