mirror of
https://github.com/Nezumi-2711/Foodify.git
synced 2026-09-22 05:31:59 +00:00
Fix bug
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
android:layout_height="120dp"
|
||||
app:srcCompat="@drawable/ic_info_blue_24dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginTop="10dp"/>
|
||||
android:layout_marginTop="5dp"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/dialog_title_flat"
|
||||
@@ -45,9 +45,11 @@
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:maxLines="3"
|
||||
android:maxLines="4"
|
||||
android:ellipsize="end"
|
||||
android:text="An error occured on remote service, please try again later"/>
|
||||
android:text="An error occured on remote service, please try again later"
|
||||
android:textSize="13sp"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btn_action_flat"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:fontFamily="@font/koho_bold"
|
||||
android:text="Success"
|
||||
android:textSize="18dp"
|
||||
android:textSize="16dp"
|
||||
android:textColor="@color/md_blue_grey_500"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
@@ -52,7 +52,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:fontFamily="@font/koho"
|
||||
android:text="Anyone with access can view your invited visitors"
|
||||
android:maxLines="2"
|
||||
android:maxLines="3"
|
||||
android:ellipsize="end"/>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
Binary file not shown.
@@ -12,7 +12,7 @@
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 1,
|
||||
"versionName": "1.0.0-beta",
|
||||
"versionName": "1.0.0",
|
||||
"outputFile": "app-release.apk"
|
||||
}
|
||||
],
|
||||
|
||||
@@ -79,7 +79,8 @@
|
||||
<activity
|
||||
android:name=".Activity.FavoriteFoodActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity
|
||||
android:name=".Activity.ShopDetailActivity"
|
||||
android:exported="false"
|
||||
|
||||
@@ -198,8 +198,6 @@ public class AddressManagerActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void onResponse(Call<CustomResponse> call, Response<CustomResponse> response) {
|
||||
|
||||
CustomResponse responseData = response.body();
|
||||
|
||||
if(response.code() == 200){
|
||||
Toast.makeText(AddressManagerActivity.this, "Đã thêm địa chỉ thành công!", Toast.LENGTH_SHORT).show();
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@ public class FavoriteFoodActivity extends AppCompatActivity implements ItemTouch
|
||||
listFavoriteFoodView = findViewById(R.id.list_favorite_food_view);
|
||||
|
||||
//Get list favorite food
|
||||
CURRENT_PAGE = 0;
|
||||
getListFavoriteFood(CURRENT_PAGE);
|
||||
|
||||
//Set layout recyclerview
|
||||
@@ -212,8 +213,8 @@ public class FavoriteFoodActivity extends AppCompatActivity implements ItemTouch
|
||||
}
|
||||
|
||||
//Show notification food has been delete
|
||||
Snackbar snackbar = Snackbar.make(listFavoriteFoodView, foodNameDelete + " remove!", Snackbar.LENGTH_LONG);
|
||||
snackbar.setAction("Undo", new View.OnClickListener() {
|
||||
Snackbar snackbar = Snackbar.make(listFavoriteFoodView, "Đã xoá " + foodNameDelete + " khỏi danh sách yêu thích!", Snackbar.LENGTH_LONG);
|
||||
snackbar.setAction("Hoàn tác", new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
adapter.undoItem(foodDelete, indexDelete, FavoriteFoodActivity.this);
|
||||
|
||||
@@ -559,14 +559,20 @@ public class MainActivity extends AppCompatActivity {
|
||||
public static List<Intent> POWER_MANAGER_INTENTS = Arrays.asList(
|
||||
new Intent().setComponent(new ComponentName("com.miui.securitycenter", "com.miui.permcenter.autostart.AutoStartManagementActivity")),
|
||||
new Intent().setComponent(new ComponentName("com.letv.android.letvsafe", "com.letv.android.letvsafe.AutobootManageActivity")),
|
||||
new Intent().setComponent(new ComponentName("com.huawei.systemmanager", "com.huawei.systemmanager.startupmgr.ui.StartupNormalAppListActivity")),
|
||||
new Intent().setComponent(new ComponentName("com.huawei.systemmanager", "com.huawei.systemmanager.optimize.process.ProtectActivity")),
|
||||
new Intent().setComponent(new ComponentName("com.huawei.systemmanager", "com.huawei.systemmanager.appcontrol.activity.StartupAppControlActivity")),
|
||||
new Intent().setComponent(new ComponentName("com.coloros.safecenter", "com.coloros.safecenter.permission.startup.StartupAppListActivity")),
|
||||
new Intent().setComponent(new ComponentName("com.coloros.safecenter", "com.coloros.safecenter.startupapp.StartupAppListActivity")),
|
||||
new Intent().setComponent(new ComponentName("com.oppo.safe", "com.oppo.safe.permission.startup.StartupAppListActivity")),
|
||||
new Intent().setComponent(new ComponentName("com.iqoo.secure", "com.iqoo.secure.ui.phoneoptimize.AddWhiteListActivity")),
|
||||
new Intent().setComponent(new ComponentName("com.iqoo.secure", "com.iqoo.secure.ui.phoneoptimize.BgStartUpManager")),
|
||||
new Intent().setComponent(new ComponentName("com.vivo.permissionmanager", "com.vivo.permissionmanager.activity.BgStartUpManagerActivity")),
|
||||
new Intent().setComponent(new ComponentName("com.asus.mobilemanager", "com.asus.mobilemanager.entry.FunctionActivity")).setData(android.net.Uri.parse("mobilemanager://function/entry/AutoStart"))
|
||||
new Intent().setComponent(new ComponentName("com.samsung.android.lool", "com.samsung.android.sm.battery.ui.BatteryActivity")),
|
||||
new Intent().setComponent(new ComponentName("com.samsung.android.lool", "com.samsung.android.sm.ui.battery.BatteryActivity")),
|
||||
new Intent().setComponent(new ComponentName("com.htc.pitroad", "com.htc.pitroad.landingpage.activity.LandingPageActivity")),
|
||||
new Intent().setComponent(new ComponentName("com.asus.mobilemanager", "com.asus.mobilemanager.MainActivity")),
|
||||
new Intent().setComponent(new ComponentName("com.transsion.phonemanager", "com.itel.autobootmanager.activity.AutoBootMgrActivity"))
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -63,6 +63,8 @@ public class OrderActivity extends AppCompatActivity {
|
||||
viewPagerAdapter = new ViewPagerAdapter(this);
|
||||
viewPager2.setAdapter(viewPagerAdapter);
|
||||
|
||||
viewPager2.setUserInputEnabled(false);
|
||||
|
||||
orderActivity = this;
|
||||
|
||||
tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
||||
|
||||
@@ -54,15 +54,18 @@ public class SignInActivity extends AppCompatActivity {
|
||||
private String email, password = null;
|
||||
private TextView txt_countdown, txt_verify_email;
|
||||
private LinearLayout countdown_layout;
|
||||
private boolean isCounting = false;
|
||||
|
||||
private final CountDownTimer count = new CountDownTimer(60000, 1000) {
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
isCounting = true;
|
||||
txt_countdown.setText(millisUntilFinished / 1000 + " giây");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
isCounting = false;
|
||||
countdown_layout.setVisibility(View.GONE);
|
||||
|
||||
txt_verify_email.setVisibility(View.VISIBLE);
|
||||
@@ -275,27 +278,44 @@ public class SignInActivity extends AppCompatActivity {
|
||||
} else {
|
||||
//Email user not verify
|
||||
|
||||
//Count down resend code
|
||||
countdown_layout.setVisibility(View.VISIBLE);
|
||||
count.start();
|
||||
//Send email verify
|
||||
user.sendEmailVerification();
|
||||
if(!isCounting){
|
||||
|
||||
txt_verify_email.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
//When user click on the text
|
||||
//UI
|
||||
txt_verify_email.setVisibility(View.GONE);
|
||||
countdown_layout.setVisibility(View.VISIBLE);
|
||||
|
||||
//Count down resend code
|
||||
countdown_layout.setVisibility(View.VISIBLE);
|
||||
count.start();
|
||||
//Count down resend code
|
||||
count.start();
|
||||
//Send email verify
|
||||
user.sendEmailVerification();
|
||||
|
||||
//Send email verify
|
||||
user.sendEmailVerification();
|
||||
txt_verify_email.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
//When user click on the text
|
||||
|
||||
txt_verify_email.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
//Count down resend code
|
||||
countdown_layout.setVisibility(View.VISIBLE);
|
||||
count.start();
|
||||
|
||||
//Send email verify
|
||||
user.sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {
|
||||
@Override
|
||||
public void onComplete(@NonNull Task<Void> task) {
|
||||
if(task.isSuccessful()){
|
||||
//Send email success
|
||||
Toast.makeText(SignInActivity.this, "Đã gửi email thành công!", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
//Send email failed
|
||||
Toast.makeText(SignInActivity.this, "Đã có lỗi xảy ra!", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
txt_verify_email.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//Log out user
|
||||
mAuth.signOut();
|
||||
@@ -306,7 +326,7 @@ public class SignInActivity extends AppCompatActivity {
|
||||
}
|
||||
} else {
|
||||
|
||||
showNotification(DialogStyle.RAINBOW, DialogType.WARNING, "Thông tin đăng nhập không đúng! Vui lòng kiểm tra và thử lại!");
|
||||
showNotification(DialogStyle.TOASTER, DialogType.WARNING, "Thông tin đăng nhập không đúng! Vui lòng kiểm tra và thử lại!");
|
||||
|
||||
//Dismiss progress bar
|
||||
progressLayout.setVisibility(View.GONE);
|
||||
|
||||
@@ -43,6 +43,7 @@ import com.google.android.material.button.MaterialButton;
|
||||
import com.google.firebase.FirebaseException;
|
||||
import com.google.firebase.auth.AuthResult;
|
||||
import com.google.firebase.auth.FirebaseAuth;
|
||||
import com.google.firebase.auth.FirebaseUser;
|
||||
import com.google.firebase.auth.PhoneAuthCredential;
|
||||
import com.google.firebase.auth.PhoneAuthOptions;
|
||||
import com.google.firebase.auth.PhoneAuthProvider;
|
||||
@@ -267,61 +268,89 @@ public class VerifyAccountActivity extends AppCompatActivity {
|
||||
code
|
||||
);
|
||||
|
||||
if(phoneAuthCredential.getSmsCode().equals(code)){
|
||||
//Create user account
|
||||
mAuth.createUserWithEmailAndPassword(user.getEmail(), password)
|
||||
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
|
||||
mAuth.signInWithCredential(phoneAuthCredential).addOnCompleteListener(new OnCompleteListener<AuthResult>() {
|
||||
@Override
|
||||
public void onComplete(@NonNull Task<AuthResult> task) {
|
||||
if(task.isSuccessful()){
|
||||
//Verify
|
||||
|
||||
FirebaseUser phoneUser = task.getResult().getUser();
|
||||
assert phoneUser != null;
|
||||
phoneUser.delete().addOnCompleteListener(new OnCompleteListener<Void>() {
|
||||
@Override
|
||||
public void onComplete(@NonNull Task<AuthResult> task) {
|
||||
if(task.isSuccessful()){
|
||||
//Add information user to server
|
||||
FoodApi.apiService.register(user).enqueue(new Callback<User>() {
|
||||
@Override
|
||||
public void onResponse(Call<User> call, Response<User> response) {
|
||||
|
||||
if(response.code() == 200){
|
||||
progressLayout.setVisibility(View.GONE);
|
||||
//Create user success;
|
||||
|
||||
new AestheticDialog.Builder(VerifyAccountActivity.this, DialogStyle.FLAT, DialogType.SUCCESS)
|
||||
.setTitle("Thông báo!")
|
||||
.setMessage("Đã tạo tài khoản thành công!")
|
||||
.setCancelable(false)
|
||||
.setOnClickListener(new OnDialogClickListener() {
|
||||
@Override
|
||||
public void onClick(@NonNull AestheticDialog.Builder dialog) {
|
||||
dialog.dismiss();
|
||||
FirebaseAuth.getInstance().signOut();
|
||||
startActivity(new Intent(VerifyAccountActivity.this, SignInActivity.class));
|
||||
finish();
|
||||
}
|
||||
})
|
||||
.show();
|
||||
} else {
|
||||
progressLayout.setVisibility(View.GONE);
|
||||
Toast.makeText(VerifyAccountActivity.this, "Lỗi hệ thống! Code: " + response.code(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<User> call, Throwable t) {
|
||||
progressLayout.setVisibility(View.GONE);
|
||||
showErrorText(t.toString());
|
||||
Log.e(TAG, t.toString());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
progressLayout.setVisibility(View.GONE);
|
||||
Common.showErrorServerNotification(VerifyAccountActivity.this, "Đã có lỗi kết nối! Vui lòng thử lại sau!");
|
||||
}
|
||||
public void onComplete(@NonNull Task<Void> task) {
|
||||
createUserAccount();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
//Not verify
|
||||
Common.notificationDialog(VerifyAccountActivity.this, DialogStyle.TOASTER, DialogType.ERROR, "Thông báo!", "Mã OTP sai! Vui lòng kiểm tra lại");
|
||||
progressLayout.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void createUserAccount() {
|
||||
//Create user account
|
||||
mAuth.createUserWithEmailAndPassword(user.getEmail(), password)
|
||||
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
|
||||
@Override
|
||||
public void onComplete(@NonNull Task<AuthResult> task) {
|
||||
if(task.isSuccessful()){
|
||||
//Add information user to server
|
||||
FoodApi.apiService.register(user).enqueue(new Callback<User>() {
|
||||
@Override
|
||||
public void onResponse(Call<User> call, Response<User> response) {
|
||||
|
||||
if(response.code() == 200){
|
||||
progressLayout.setVisibility(View.GONE);
|
||||
//Create user success;
|
||||
|
||||
//Send email
|
||||
FirebaseUser firebaseUser = task.getResult().getUser();
|
||||
assert firebaseUser != null;
|
||||
firebaseUser.sendEmailVerification();
|
||||
|
||||
new AestheticDialog.Builder(VerifyAccountActivity.this, DialogStyle.FLAT, DialogType.SUCCESS)
|
||||
.setTitle("Đã tạo tài khoản thành công!")
|
||||
.setMessage("Hiện tại bạn còn 1 bước xác thực email để có thể đăng nhập app! Vui lòng kiểm tra email và làm theo hướng dẫn " +
|
||||
"để có thể tiếp tục!")
|
||||
.setCancelable(false)
|
||||
.setOnClickListener(new OnDialogClickListener() {
|
||||
@Override
|
||||
public void onClick(@NonNull AestheticDialog.Builder dialog) {
|
||||
dialog.dismiss();
|
||||
|
||||
FirebaseAuth.getInstance().signOut();
|
||||
startActivity(new Intent(VerifyAccountActivity.this, SignInActivity.class));
|
||||
finish();
|
||||
}
|
||||
})
|
||||
.show();
|
||||
} else {
|
||||
progressLayout.setVisibility(View.GONE);
|
||||
Toast.makeText(VerifyAccountActivity.this, "Lỗi hệ thống! Code: " + response.code(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<User> call, Throwable t) {
|
||||
progressLayout.setVisibility(View.GONE);
|
||||
showErrorText(t.toString());
|
||||
Log.e(TAG, t.toString());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
progressLayout.setVisibility(View.GONE);
|
||||
Common.showErrorServerNotification(VerifyAccountActivity.this, "Đã có lỗi kết nối! Vui lòng thử lại sau!");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void showErrorText(String msg){
|
||||
errorText.setText(msg);
|
||||
}
|
||||
|
||||
@@ -360,29 +360,29 @@
|
||||
android:id="@+id/user_comment_layout"
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:id="@+id/layout1"
|
||||
>
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/profile_avatar"
|
||||
android:src="@drawable/profile_avatar"
|
||||
app:riv_corner_radius="180dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/profile_avatar"
|
||||
android:src="@drawable/profile_avatar"
|
||||
app:riv_corner_radius="180dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_gravity="center_vertical"
|
||||
/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="@integer/material_motion_duration_long_1"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_name_text_view"
|
||||
@@ -393,9 +393,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/profile_avatar"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
|
||||
<com.willy.ratingbar.ScaleRatingBar
|
||||
@@ -403,48 +402,43 @@
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="22dp"
|
||||
app:srb_starPadding="5dp"
|
||||
android:layout_marginStart="6dp"
|
||||
app:srb_clickable="false"
|
||||
app:srb_starWidth="12dp"
|
||||
app:srb_starHeight="12dp"
|
||||
app:srb_numStars="5"
|
||||
app:srb_scrollable="false"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="-5dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/user_name_text_view"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_user"
|
||||
android:text="Food is good!"
|
||||
android:fontFamily="@font/koho"
|
||||
android:textSize="15sp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rating_bar_comment"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_user"
|
||||
android:text="Food is good!"
|
||||
android:fontFamily="@font/koho"
|
||||
android:textSize="15sp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/comment_user"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/baseline_edit_24"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/edit_button"
|
||||
android:layout_marginEnd="30dp"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
@@ -452,12 +446,15 @@
|
||||
android:src="@drawable/baseline_delete_24"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="7dp"
|
||||
/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
@@ -15,30 +15,30 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
>
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/profile_avatar"
|
||||
android:src="@drawable/profile_avatar"
|
||||
app:riv_corner_radius="180dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:id="@+id/layout1"
|
||||
>
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/profile_avatar"
|
||||
android:src="@drawable/profile_avatar"
|
||||
app:riv_corner_radius="180dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_name_text_view"
|
||||
@@ -49,9 +49,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/profile_avatar"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
|
||||
<com.willy.ratingbar.ScaleRatingBar
|
||||
@@ -59,33 +58,33 @@
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="22dp"
|
||||
app:srb_starPadding="5dp"
|
||||
android:layout_marginStart="6dp"
|
||||
app:srb_clickable="false"
|
||||
app:srb_starWidth="12dp"
|
||||
app:srb_starHeight="12dp"
|
||||
app:srb_numStars="5"
|
||||
app:srb_scrollable="false"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="-5dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/user_name_text_view"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_user"
|
||||
android:text="Food is good!"
|
||||
android:fontFamily="@font/koho"
|
||||
android:textSize="15sp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginStart="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rating_bar"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_user"
|
||||
android:text="Food is good!"
|
||||
android:fontFamily="@font/koho"
|
||||
android:textSize="15sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user