Remove username

This commit is contained in:
Nezumi
2023-03-03 10:32:35 +07:00
parent 71d24ef9dd
commit 498459696a
6 changed files with 21 additions and 131 deletions
@@ -2,6 +2,7 @@ package com.capstone.foodify.Activity;
import androidx.appcompat.app.AppCompatActivity;
import android.app.AlertDialog;
import android.app.DatePickerDialog;
import android.content.Intent;
import android.graphics.Typeface;
@@ -21,7 +22,7 @@ import java.util.Locale;
public class AccountAndProfileActivity extends AppCompatActivity {
TextInputLayout textInput_email, textInput_phone, textInput_firstName, textInput_lastName, textInput_birthDay, textInput_username;
TextInputLayout textInput_email, textInput_phone, textInput_fullName, textInput_birthDay;
EditText edt_birthday;
final Calendar myCalendar= Calendar.getInstance();
@@ -58,10 +59,8 @@ public class AccountAndProfileActivity extends AppCompatActivity {
private void initComponent() {
textInput_email= (TextInputLayout) findViewById(R.id.textInput_email);
textInput_phone = (TextInputLayout) findViewById(R.id.textInput_phone);
textInput_firstName = (TextInputLayout) findViewById(R.id.textInput_firstName);
textInput_lastName = (TextInputLayout) findViewById(R.id.textInput_lastName);
textInput_fullName = (TextInputLayout) findViewById(R.id.textInput_fullName);
textInput_birthDay = (TextInputLayout) findViewById(R.id.textInput_birthDay);
textInput_username = (TextInputLayout) findViewById(R.id.textInput_username);
change_password = (LinearLayout) findViewById(R.id.change_password);
back_image = (ImageView) findViewById(R.id.back_image);
@@ -75,10 +74,8 @@ public class AccountAndProfileActivity extends AppCompatActivity {
//Set Type face
textInput_email.setTypeface(bebas);
textInput_phone.setTypeface(bebas);
textInput_firstName.setTypeface(bebas);
textInput_lastName.setTypeface(bebas);
textInput_fullName.setTypeface(bebas);
textInput_birthDay.setTypeface(bebas);
textInput_username.setTypeface(bebas);
edt_birthday.setTypeface(bebas);
}
@@ -98,7 +95,7 @@ public class AccountAndProfileActivity extends AppCompatActivity {
edt_birthday.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
new DatePickerDialog(AccountAndProfileActivity.this,date,myCalendar.get(Calendar.YEAR),myCalendar.get(Calendar.MONTH),myCalendar.get(Calendar.DAY_OF_MONTH)).show();
new DatePickerDialog(AccountAndProfileActivity.this, date, myCalendar.get(Calendar.YEAR), myCalendar.get(Calendar.MONTH), myCalendar.get(Calendar.DAY_OF_MONTH)).show();
}
});
}
@@ -36,8 +36,7 @@ import retrofit2.Response;
public class SignUpActivity extends AppCompatActivity {
TextInputLayout textInput_email, textInput_password, textInput_phone,
textInput_address, textInput_repeatPassword, textInput_firstName, textInput_lastName, textInput_birthDay,
textInput_username;
textInput_address, textInput_repeatPassword, textInput_fullName, textInput_birthDay;
final Calendar myCalendar= Calendar.getInstance();
EditText edt_birthday;
TextView signIn_textView;
@@ -99,10 +98,8 @@ public class SignUpActivity extends AppCompatActivity {
textInput_phone = (TextInputLayout) findViewById(R.id.textInput_phone);
textInput_address = (TextInputLayout) findViewById(R.id.textInput_address);
textInput_repeatPassword = (TextInputLayout) findViewById(R.id.textInput_confirmPassword);
textInput_firstName = (TextInputLayout) findViewById(R.id.textInput_firstName);
textInput_lastName = (TextInputLayout) findViewById(R.id.textInput_lastName);
textInput_fullName = (TextInputLayout) findViewById(R.id.textInput_fullName);
textInput_birthDay = (TextInputLayout) findViewById(R.id.textInput_birthDay);
textInput_username = (TextInputLayout) findViewById(R.id.textInput_username);
edt_birthday = (EditText) findViewById(R.id.edt_birthDay);
@@ -217,7 +214,6 @@ public class SignUpActivity extends AppCompatActivity {
private void chooseDateOfBirth() {
//Calendar date of birth
DatePickerDialog.OnDateSetListener date = new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int month, int day) {
@@ -250,10 +246,8 @@ public class SignUpActivity extends AppCompatActivity {
textInput_phone.setTypeface(bebas);
textInput_address.setTypeface(bebas);
textInput_repeatPassword.setTypeface(bebas);
textInput_firstName.setTypeface(bebas);
textInput_lastName.setTypeface(bebas);
textInput_fullName.setTypeface(bebas);
textInput_birthDay.setTypeface(bebas);
textInput_username.setTypeface(bebas);
edt_birthday.setTypeface(bebas);
}
@@ -63,7 +63,7 @@
android:hint="@string/phone_text"
app:boxBackgroundColor="@color/white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@id/textInput_username"
app:layout_constraintBottom_toTopOf="@id/textInput_fullName"
app:startIconDrawable="@drawable/baseline_phone_24"
app:startIconTint="@color/primaryColor">
@@ -78,79 +78,29 @@
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInput_username"
android:id="@+id/textInput_fullName"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="20dp"
android:hint="@string/username"
android:hint="@string/full_name"
app:boxBackgroundColor="@color/white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@id/linearLayout_fullName"
app:startIconDrawable="@drawable/baseline_abc_24"
app:layout_constraintBottom_toTopOf="@id/textInput_birthDay"
app:startIconDrawable="@drawable/baseline_phone_24"
app:startIconTint="@color/primaryColor">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edt_username"
android:id="@+id/edt_fullName"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:inputType="text"
android:inputType="phone"
android:enabled="false"
/>
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:id="@+id/linearLayout_fullName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="20dp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@id/textInput_birthDay"
>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInput_firstName"
android:layout_width="150dp"
android:layout_height="60dp"
android:layout_marginEnd="20dp"
android:hint="@string/first_name_text"
app:boxBackgroundColor="@color/white"
app:startIconDrawable="@drawable/baseline_abc_24"
app:startIconTint="@color/primaryColor">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edt_first_name"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:inputType="textPassword" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInput_lastName"
android:layout_width="match_parent"
android:layout_height="60dp"
android:hint="@string/last_name_text"
app:boxBackgroundColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textInput_phone">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edt_last_name"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:inputType="textPassword" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInput_birthDay"
android:layout_width="match_parent"
+5 -56
View File
@@ -76,12 +76,12 @@
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInput_username"
android:id="@+id/textInput_fullName"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:hint="Username"
android:hint="@string/full_name"
app:boxBackgroundColor="@color/white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textInput_phone"
@@ -89,64 +89,13 @@
app:startIconTint="@color/primaryColor">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edt_username"
android:id="@+id/edt_fullName"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:inputType="text" />
android:inputType="phone" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:id="@+id/linearLayout_fullName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textInput_username">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInput_firstName"
android:layout_width="150dp"
android:layout_height="60dp"
android:layout_marginEnd="20dp"
android:hint="@string/first_name_text"
app:boxBackgroundColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textInput_phone"
app:startIconDrawable="@drawable/baseline_abc_24"
app:startIconTint="@color/primaryColor">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edt_first_name"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:inputType="textPassword" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInput_lastName"
android:layout_width="match_parent"
android:layout_height="60dp"
android:hint="@string/last_name_text"
app:boxBackgroundColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textInput_phone">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edt_last_name"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:inputType="textPassword" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInput_birthDay"
android:layout_width="match_parent"
@@ -157,7 +106,7 @@
app:boxBackgroundColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout_fullName"
app:layout_constraintTop_toBottomOf="@+id/textInput_fullName"
app:startIconDrawable="@drawable/baseline_calendar_month_24"
app:startIconTint="@color/primaryColor">
+1
View File
@@ -47,4 +47,5 @@
<string name="change_password">Đổi mật khẩu</string>
<string name="account_and_profile">Thông tin tài khoản</string>
<string name="delete">Delete</string>
<string name="full_name">Họ và tên</string>
</resources>
-1
View File
@@ -30,5 +30,4 @@
<item name="android:color">@color/primaryColor</item>
</style>
</resources>