diff --git a/app/src/main/java/com/example/chan24/smartplanner/LoginActivity.java b/app/src/main/java/com/example/chan24/smartplanner/LoginActivity.java index bd8d6235134cfa1732ce7590083234cad63d1162..05b23b2a7530749cbdaba5909cc85b148a1dd3b7 100644 --- a/app/src/main/java/com/example/chan24/smartplanner/LoginActivity.java +++ b/app/src/main/java/com/example/chan24/smartplanner/LoginActivity.java @@ -50,6 +50,7 @@ public class LoginActivity extends AppCompatActivity { { flag =0; Intent i =new Intent(getApplicationContext(),UserArea.class); + i.putExtra("name",n); startActivity(i); } } diff --git a/app/src/main/java/com/example/chan24/smartplanner/UserArea.java b/app/src/main/java/com/example/chan24/smartplanner/UserArea.java index f190380be6ac3f98f2df00ee823cbe85877a5609..0d8ec1061dca72ddde9cbf7858cb70bf9440c36f 100644 --- a/app/src/main/java/com/example/chan24/smartplanner/UserArea.java +++ b/app/src/main/java/com/example/chan24/smartplanner/UserArea.java @@ -11,6 +11,7 @@ import android.os.Bundle; import android.view.MenuItem; import android.view.View; import android.widget.Button; +import android.widget.TextView; import android.widget.Toast; import com.google.android.gms.common.ConnectionResult; @@ -30,6 +31,11 @@ public class UserArea extends AppCompatActivity { Toast.makeText(this,"Perfect",Toast.LENGTH_SHORT).show(); } + Intent i =getIntent(); + String s = i.getStringExtra("name"); + TextView v =(TextView)findViewById(R.id.textView2); + v.setText("Welcome "+s); + mDrawerLayout = (DrawerLayout)findViewById(R.id.activity_user_area); mToggle = new ActionBarDrawerToggle(this,mDrawerLayout,R.string.open,R.string.close); diff --git a/app/src/main/res/layout/activity_user_area.xml b/app/src/main/res/layout/activity_user_area.xml index 28d1259e36d1b3cff71eb10dfa3bd4576d97bdc6..1a4f503549272700f0c40ad66ba3d08e0c535c0b 100644 --- a/app/src/main/res/layout/activity_user_area.xml +++ b/app/src/main/res/layout/activity_user_area.xml @@ -13,6 +13,36 @@ android:orientation="vertical"> + <TextView + android:id="@+id/textView2" + android:layout_width="match_parent" + android:layout_height="50dp" /> + + <CheckBox + android:id="@+id/shopping" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="Shopping" /> + + <CheckBox + android:id="@+id/Movies" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="Movies" /> + + <CheckBox + android:id="@+id/Dining" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="Dining" /> + + <Button + android:id="@+id/save" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="Save" /> + + </LinearLayout> <android.support.design.widget.NavigationView