Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ANDROID PROGRAMMING LAB
- NAME: ASHISH
- 1. Registration form program
- activity_main.xml
- <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=".MainActivity" >
- <TextView
- android:id="@+id/textView2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_centerHorizontal="true"
- android:text="@string/hello_world" />
- <TextView
- android:id="@+id/textView1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_below="@+id/textView2"
- android:layout_marginTop="26dp"
- android:text="@string/name"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- <EditText
- android:id="@+id/editText1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@+id/textView2"
- android:layout_alignTop="@+id/textView1"
- android:ems="10"
- android:inputType="textPersonName" />
- <EditText
- android:id="@+id/editText2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@+id/editText1"
- android:layout_alignTop="@+id/textView3"
- android:ems="10"
- android:inputType="number" />
- <EditText
- android:id="@+id/editText3"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignBottom="@+id/textView4"
- android:layout_alignLeft="@+id/editText2"
- android:ems="10"
- android:inputType="textPostalAddress" >
- <requestFocus />
- </EditText>
- <AutoCompleteTextView
- android:id="@+id/autoCompleteTextView1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignBaseline="@+id/textView5"
- android:layout_alignBottom="@+id/textView5"
- android:layout_alignLeft="@+id/editText3"
- android:layout_alignParentRight="true"
- android:ems="10"
- />
- <Button
- android:id="@+id/button1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_centerHorizontal="true"
- android:layout_marginBottom="20dp"
- android:text="@string/submit" />
- <TextView
- android:id="@+id/textView3"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@+id/textView1"
- android:layout_below="@+id/editText1"
- android:text="@string/age"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- <TextView
- android:id="@+id/textView5"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@+id/textView4"
- android:layout_below="@+id/textView4"
- android:layout_marginTop="23dp"
- android:text="@string/degree"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- <TextView
- android:id="@+id/textView4"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@+id/textView3"
- android:layout_below="@+id/editText2"
- android:layout_marginTop="17dp"
- android:text="@string/address"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- <TextView
- android:id="@+id/textView6"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@+id/textView5"
- android:layout_alignRight="@+id/textView5"
- android:layout_below="@+id/autoCompleteTextView1"
- android:layout_marginTop="15dp"
- android:text="@string/state"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- <Spinner
- android:id="@+id/spinner1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@+id/autoCompleteTextView1"
- android:layout_alignTop="@+id/textView6" />
- </RelativeLayout>
- strings.xml
- <?xml version="1.0" encoding="utf-8"?>
- <resources>
- <string name="app_name">regform</string>
- <string name="action_settings">Settings</string>
- <string name="hello_world">Registration Form</string>
- <string name="name">Name</string>
- <string name="age">Age</string>
- <string name="address">Address</string>
- <string name="degree">Degree</string>
- <string name="submit">Submit</string>
- <string name="state">State</string>
- <string-array name="st">
- <item>Tamil Nadu</item>
- <item>Andhra Pradesh</item>
- <item>Karnataka</item>
- <item>Kerala</item>
- </string-array>
- </resources>
- Main_Activity.java
- package com.example.regform;
- import android.os.Bundle;
- import android.app.Activity;
- import android.graphics.Color;
- import android.view.Menu;
- import android.view.View;
- import android.view.View.OnClickListener;
- import android.widget.ArrayAdapter;
- import android.widget.AutoCompleteTextView;
- import android.widget.Button;
- import android.widget.EditText;
- import android.widget.Spinner;
- import android.widget.Toast;
- public class MainActivity extends Activity implements OnClickListener{
- Button b1;
- EditText name,age,address;
- AutoCompleteTextView degree;
- final String[] deg={"MCA","M.Tech","B.Tech","BCA","B.Sc","BBA","MBA"};
- Spinner spinner;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- b1=(Button) findViewById(R.id.button1);
- name=(EditText)findViewById(R.id.editText1);
- age=(EditText)findViewById(R.id.editText2);
- address=(EditText)findViewById(R.id.editText3);
- degree=(AutoCompleteTextView) findViewById(R.id.autoCompleteTextView1);
- degree.setThreshold(1);
- ArrayAdapter <String> adapter=new ArrayAdapter <String>(this,android.R.layout.simple_dropdown_item_1line,deg);
- degree.setAdapter(adapter);
- degree.setTextColor(Color.CYAN);
- spinner=(Spinner)findViewById(R.id.spinner1);
- ArrayAdapter <CharSequence> ad=ArrayAdapter.createFromResource(this, R.array.st, android.R.layout.simple_spinner_item);
- ad.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
- spinner.setAdapter(ad);
- b1.setOnClickListener(this);
- }
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- // Inflate the menu; this adds items to the action bar if it is present.
- getMenuInflater().inflate(R.menu.main, menu);
- return true;
- }
- @Override
- public void onClick(View arg0) {
- // TODO Auto-generated method stub
- Toast.makeText(this, "Registered Successfully", Toast.LENGTH_SHORT).show();
- }
- }
- 2. Simple Calculator
- Activity_main.xml
- <?xml version="1.0" encoding="utf-8"?>
- <layout>
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- tools:context="com.example.oviya.calc_acad.MainActivity">
- <TextView
- android:id="@+id/txtscreen"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_centerHorizontal="true"
- android:gravity="center_vertical|right"
- android:maxLength="16"
- android:padding="10dp"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textSize="30sp"
- android:typeface="serif"
- />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_below="@+id/txtscreen"
- android:orientation="vertical"
- >
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1">
- <Button
- android:id="@+id/b7"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:textSize="30sp"
- android:text="7"
- android:background="@drawable/button"/>
- <Button
- android:id="@+id/b8"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:textSize="30sp"
- android:text="8"
- android:background="@drawable/button"/>
- <Button
- android:id="@+id/b9"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:textSize="30sp"
- android:text="9"
- android:background="@drawable/button"/>
- <Button
- android:id="@+id/div"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:textSize="30sp"
- android:text="/"
- android:background="@drawable/button"/>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1">
- <Button
- android:id="@+id/b4"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:textSize="30sp"
- android:text="4"
- android:background="@drawable/button"/>
- <Button
- android:id="@+id/b5"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:textSize="30sp"
- android:text="5"
- android:background="@drawable/button"/>
- <Button
- android:id="@+id/b6"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:textSize="30sp"
- android:text="6"
- android:background="@drawable/button"/>
- <Button
- android:id="@+id/mul"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:textSize="30sp"
- android:text="*"
- android:background="@drawable/button"/>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1">
- <Button
- android:id="@+id/b1"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:textSize="30sp"
- android:text="1"
- android:background="@drawable/button"/>
- <Button
- android:id="@+id/b2"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:textSize="30sp"
- android:text="2"
- android:background="@drawable/button"/>
- <Button
- android:id="@+id/b3"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:textSize="30sp"
- android:text="3"
- android:background="@drawable/button"/>
- <Button
- android:id="@+id/sub"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:textSize="30sp"
- android:text="-"
- android:background="@drawable/button"/>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1">
- <Button
- android:id="@+id/bdot"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:textSize="30sp"
- android:text="."
- android:background="@drawable/button"/>
- <Button
- android:id="@+id/b0"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:textSize="30sp"
- android:text="0"
- android:background="@drawable/button"/>
- <Button
- android:id="@+id/bc"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:textSize="30sp"
- android:text="C"
- android:background="@drawable/button"/>
- <Button
- android:id="@+id/plus"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:textSize="30sp"
- android:text="+"
- android:background="@drawable/button"/>
- </LinearLayout>
- <Button
- android:id="@+id/equal"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- android:textSize="30sp"
- android:text="="
- android:background="@drawable/button"/>
- </LinearLayout>
- </RelativeLayout>
- </layout>
- Button.xml
- <?xml version="1.0" encoding="utf-8"?>
- <selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true">
- <shape>
- <gradient android:angle="90" android:endColor="#FFFFFF" android:startColor="#9EB8FF" android:type="linear"></gradient>
- <padding android:bottom="0dp" android:left="0dp" android:right="0dp" android:top="0dp"/>
- <size android:height="60dp" android:width="60dp"/>
- <stroke android:width="1dp" android:color="#ff3da6ef"/>
- </shape>
- </item>
- <item>
- <shape>
- <gradient android:angle="90" android:endColor="#FFFFFF" android:startColor="#ffd9d9d9" android:type="linear"/>
- <padding android:bottom="0dp" android:left="0dp" android:right="0dp" android:top="0dp"/>
- <size android:height="60dp" android:width="60dp"/>
- <stroke android:width="0.5dp" android:color="#ffcecece"/>
- </shape>
- </item>
- </selector>
- MainActivity.java
- package com.example.oviya.calc_acad;
- import android.support.v7.app.AppCompatActivity;
- import android.os.Bundle;
- import android.support.v7.app.ActionBarActivity;
- import android.view.View;
- import android.widget.Button;
- import android.widget.TextView;
- import net.objecthunter.exp4j.Expression;
- import net.objecthunter.exp4j.ExpressionBuilder;
- public class MainActivity extends ActionBarActivity {
- private int[] nb={R.id.b0,R.id.b1,R.id.b2,R.id.b3,R.id.b4,R.id.b5,R.id.b6,R.id.b7,R.id.b8,R.id.b9};
- private int[] ob={R.id.plus,R.id.sub,R.id.mul,R.id.div};
- private TextView txtscreen;
- private boolean lastNumeric;
- private boolean stateError;
- private boolean lastDot;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- this.txtscreen= (TextView) findViewById(R.id.txtscreen);
- setNumericOnClickListener();
- setOperatorOnClickListerner();
- }
- private void setOperatorOnClickListerner() {
- View.OnClickListener l=new View.OnClickListener(){
- @Override
- public void onClick(View view) {
- if(lastNumeric&&!stateError){
- Button b=(Button) view;
- txtscreen.append(b.getText());
- lastNumeric=false;
- lastDot=false;
- }
- }
- };
- for(int id:ob){
- findViewById(id).setOnClickListener(l);
- }
- findViewById(R.id.bdot).setOnClickListener(new View.OnClickListener(){
- @Override
- public void onClick(View view) {
- if(lastNumeric&&!stateError&&!lastDot){
- txtscreen.append(".");
- lastDot=true;
- lastNumeric=false;
- }
- }
- });
- findViewById(R.id.bc).setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- txtscreen.setText("");
- lastNumeric=false;
- stateError=false;
- lastDot=false;
- }
- });
- findViewById(R.id.equal).setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- onEqual();
- }
- });
- }
- private void onEqual(){
- if(lastNumeric&&!stateError){
- String txt=txtscreen.getText().toString();
- Expression e=new ExpressionBuilder(txt).build();
- try{
- double res=e.evaluate();
- txtscreen.setText(Double.toString(res));
- lastDot=true;
- }
- catch (ArithmeticException ex){
- txtscreen.setText("Error");;
- stateError=true;
- lastNumeric=false;
- }
- }
- }
- private void setNumericOnClickListener() {
- View.OnClickListener l=new View.OnClickListener(){
- @Override
- public void onClick(View view) {
- Button b=(Button) view;
- if(stateError){
- txtscreen.setText(b.getText());
- stateError= false;
- }
- else
- {
- txtscreen.append(b.getText());
- }
- lastNumeric=true;
- }
- };
- for(int id:nb){
- findViewById(id).setOnClickListener(l);
- }
- }
- }
- 3. Fragments
- activity_main.xml
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- tools:context="com.example.oviya.clockacad.MainActivity">
- <RelativeLayout
- android:id="@+id/firstlayout"
- android:layout_width="match_parent"
- android:layout_height="300dp">
- </RelativeLayout>
- <LinearLayout
- android:id="@+id/secondlayout"
- android:layout_width="match_parent"
- android:layout_height="320dp"
- android:orientation="horizontal"></LinearLayout>
- </LinearLayout>
- Fragment_first.xml
- <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"
- tools:context="com.example.oviya.clockacad.FirstFragment"
- android:background="@color/colorPrimary">
- <!-- TODO: Update blank fragment layout -->
- <AnalogClock
- android:id="@+id/ac"
- android:layout_width="match_parent"
- android:layout_height="100dp"
- android:textAlignment="center"
- android:layout_marginTop="114dp"
- android:layout_alignParentTop="true"
- android:layout_alignParentStart="true" />
- </RelativeLayout>
- Fragment_second.xml
- <LinearLayout 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"
- tools:context="com.example.oviya.clockacad.SecondFragment"
- android:background="@color/colorAccent">
- <!-- TODO: Update blank fragment layout -->
- <DigitalClock
- android:id="@+id/dc"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true"
- android:layout_marginTop="114dp"
- android:textSize="50dp"
- android:textAlignment="center" />
- </LinearLayout>
- MainActivity.java
- package com.example.oviya.clockacad;
- import android.support.v4.app.FragmentManager;
- import android.support.v7.app.AppCompatActivity;
- import android.os.Bundle;
- public class MainActivity extends AppCompatActivity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- FirstFragment f=new FirstFragment();
- FragmentManager manager=getSupportFragmentManager();
- manager.beginTransaction()
- .replace(R.id.firstlayout,f,f.getTag())
- .commit();
- SecondFragment s=new SecondFragment();
- FragmentManager m=getSupportFragmentManager();
- m.beginTransaction()
- .replace(R.id.secondlayout,s,s.getTag())
- .commit();
- }
- }
- FirstFragment.java
- package com.example.oviya.clockacad;
- import android.os.Bundle;
- import android.support.v4.app.Fragment;
- import android.view.LayoutInflater;
- import android.view.View;
- import android.view.ViewGroup;
- /**
- * A simple {@link Fragment} subclass.
- */
- public class FirstFragment extends Fragment {
- public FirstFragment() {
- // Required empty public constructor
- }
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- // Inflate the layout for this fragment
- return inflater.inflate(R.layout.fragment_first, container, false);
- }
- }
- SecondFragment.java
- package com.example.oviya.clockacad;
- import android.os.Bundle;
- import android.support.v4.app.Fragment;
- import android.view.LayoutInflater;
- import android.view.View;
- import android.view.ViewGroup;
- /**
- * A simple {@link Fragment} subclass.
- */
- public class SecondFragment extends Fragment {
- public SecondFragment() {
- // Required empty public constructor
- }
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- // Inflate the layout for this fragment
- return inflater.inflate(R.layout.fragment_second, container, false);
- }
- }
- 4. Dialog Window
- Activity_main.xml
- <?xml version="1.0" encoding="utf-8"?>
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- tools:context="com.example.oviya.dialog_acad.MainActivity">
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="Dialog Demo"
- android:textAlignment="center"
- android:textColor="@color/black"
- android:textSize="25dp"
- app:layout_constraintLeft_toLeftOf="parent"
- app:layout_constraintRight_toRightOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- android:id="@+id/textView" />
- <Button
- android:id="@+id/button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Login"
- tools:layout_editor_absoluteX="134dp"
- tools:layout_editor_absoluteY="74dp"
- android:onClick="LoginMethod"
- android:layout_below="@+id/textView"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="65dp" />
- </RelativeLayout>
- Dialog_activity.xml
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="match_parent"
- android:layout_height="match_parent">
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="Login"
- android:textSize="25dp"
- android:textAlignment="center"
- android:textColor="@color/black"
- />
- <EditText
- android:id="@+id/username"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="User name"
- android:inputType="text"/>
- <EditText
- android:id="@+id/password"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="Password"
- android:inputType="textPassword"/>
- />
- </LinearLayout>
- MainActivity.java
- package com.example.oviya.dialog_acad;
- import android.support.v4.app.FragmentActivity;
- import android.support.v7.app.AppCompatActivity;
- import android.os.Bundle;
- import android.view.View;
- public class MainActivity extends FragmentActivity{
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- }
- public void LoginMethod(View v){
- ActivityDialog dialog=new ActivityDialog();
- dialog.show(getSupportFragmentManager(),"my_dialog");
- }
- }
- ActivityDialog.java
- package com.example.oviya.dialog_acad;
- import android.app.AlertDialog;
- import android.app.Dialog;
- import android.content.DialogInterface;
- import android.os.Bundle;
- import android.support.annotation.NonNull;
- import android.support.v4.app.DialogFragment;
- import android.view.LayoutInflater;
- import android.view.View;
- import android.widget.EditText;
- import android.widget.Toast;
- /**
- * Created by oviya on 17-09-2017.
- */
- public class ActivityDialog extends DialogFragment {
- LayoutInflater inflater;
- EditText user,pass;
- View v;
- @NonNull
- @Override
- public Dialog onCreateDialog(Bundle savedInstanceState) {
- inflater=getActivity().getLayoutInflater();
- v=inflater.inflate(R.layout.dialog_activity,null);
- AlertDialog.Builder builder=new AlertDialog.Builder(getActivity());
- builder.setView(v).setPositiveButton("OK", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialogInterface, int i) {
- user=v.findViewById(R.id.username);
- pass=v.findViewById(R.id.password);
- Toast.makeText(getActivity(),"Welcome "+user.getText().toString()+"\n"+"Password "+pass.getText().toString(),Toast.LENGTH_LONG).show();
- }
- }).setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialogInterface, int i) {
- }
- });
- return builder.create();
- }
- }
Add Comment
Please, Sign In to add comment