mirror of
https://github.com/Nezumi-2711/PRM392.git
synced 2026-09-22 13:48:29 +00:00
Fix layout add/update menu and food
This commit is contained in:
@@ -4,7 +4,6 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.loader.content.AsyncTaskLoader;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.ProgressDialog;
|
||||
|
||||
@@ -3,124 +3,125 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardElevation="4dp"
|
||||
>
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_margin="20dp"
|
||||
android:orientation="vertical"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.rengwuxian.materialedittext.MaterialEditText
|
||||
android:id="@+id/edtName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:backgroundTint="#CCCCCC"
|
||||
android:drawablePadding="13dp"
|
||||
android:textSize="28sp"
|
||||
android:hint="Tên món ăn"
|
||||
android:inputType="text"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/black"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent=".8" />
|
||||
|
||||
<com.rengwuxian.materialedittext.MaterialEditText
|
||||
android:id="@+id/edtDescription"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:backgroundTint="#CCCCCC"
|
||||
android:drawablePadding="13dp"
|
||||
android:hint="Mô tả về món ăn này"
|
||||
android:inputType="textMultiLine"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/black"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent=".8" />
|
||||
|
||||
<com.rengwuxian.materialedittext.MaterialEditText
|
||||
android:id="@+id/edtPrice"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:backgroundTint="#CCCCCC"
|
||||
android:drawablePadding="13dp"
|
||||
android:hint="Giá"
|
||||
android:inputType="number"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/black"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent=".8" />
|
||||
|
||||
<com.rengwuxian.materialedittext.MaterialEditText
|
||||
android:id="@+id/edtDiscount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:backgroundTint="#CCCCCC"
|
||||
android:drawablePadding="13dp"
|
||||
android:hint="Giảm giá"
|
||||
android:inputType="number"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/black"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent=".8" />
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:weightSum="2"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<info.hoang8f.widget.FButton
|
||||
android:id="@+id/btnSelect"
|
||||
android:text="Chọn ảnh..."
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_width="0dp"
|
||||
<com.rengwuxian.materialedittext.MaterialEditText
|
||||
android:id="@+id/edtName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_alignParentBottom="true"
|
||||
app:fButtonColor="@color/colorPrimary"
|
||||
app:shadowColor="@color/black"
|
||||
app:shadowEnabled="true"
|
||||
app:shadowHeight="5dp"
|
||||
app:cornerRadius="4dp"
|
||||
/>
|
||||
android:layout_marginTop="20dp"
|
||||
android:backgroundTint="#CCCCCC"
|
||||
android:drawablePadding="13dp"
|
||||
android:hint="Tên món ăn"
|
||||
android:inputType="text"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/black"
|
||||
android:textSize="28sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent=".8" />
|
||||
|
||||
<info.hoang8f.widget.FButton
|
||||
android:id="@+id/btnUpload"
|
||||
android:text="Tải ảnh lên"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_width="0dp"
|
||||
<com.rengwuxian.materialedittext.MaterialEditText
|
||||
android:id="@+id/edtDescription"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_alignParentBottom="true"
|
||||
app:fButtonColor="@color/btnSignActive"
|
||||
app:shadowColor="@color/black"
|
||||
app:shadowEnabled="true"
|
||||
app:shadowHeight="5dp"
|
||||
app:cornerRadius="4dp"
|
||||
/>
|
||||
android:layout_marginTop="20dp"
|
||||
android:backgroundTint="#CCCCCC"
|
||||
android:drawablePadding="13dp"
|
||||
android:hint="Mô tả về món ăn này"
|
||||
android:inputType="textMultiLine"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/black"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent=".8" />
|
||||
|
||||
<com.rengwuxian.materialedittext.MaterialEditText
|
||||
android:id="@+id/edtPrice"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:backgroundTint="#CCCCCC"
|
||||
android:drawablePadding="13dp"
|
||||
android:hint="Giá"
|
||||
android:inputType="number"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/black"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent=".8" />
|
||||
|
||||
<com.rengwuxian.materialedittext.MaterialEditText
|
||||
android:id="@+id/edtDiscount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:backgroundTint="#CCCCCC"
|
||||
android:drawablePadding="13dp"
|
||||
android:hint="Giảm giá"
|
||||
android:inputType="number"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/black"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent=".8" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2">
|
||||
|
||||
<info.hoang8f.widget.FButton
|
||||
android:id="@+id/btnSelect"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_weight="1"
|
||||
android:text="Chọn ảnh..."
|
||||
android:textColor="@color/white"
|
||||
app:cornerRadius="4dp"
|
||||
app:fButtonColor="@color/colorPrimary"
|
||||
app:shadowColor="@color/black"
|
||||
app:shadowEnabled="true"
|
||||
app:shadowHeight="5dp" />
|
||||
|
||||
<info.hoang8f.widget.FButton
|
||||
android:id="@+id/btnUpload"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_weight="1"
|
||||
android:text="Tải ảnh lên"
|
||||
android:textColor="@color/white"
|
||||
app:cornerRadius="4dp"
|
||||
app:fButtonColor="@color/btnSignActive"
|
||||
app:shadowColor="@color/black"
|
||||
app:shadowEnabled="true"
|
||||
app:shadowHeight="5dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
@@ -6,73 +6,78 @@
|
||||
app:cardElevation="4dp"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_margin="20dp"
|
||||
android:orientation="vertical"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.rengwuxian.materialedittext.MaterialEditText
|
||||
android:id="@+id/edtName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:backgroundTint="#CCCCCC"
|
||||
android:drawableLeft="@drawable/ic_baseline_fastfood_24"
|
||||
android:drawablePadding="13dp"
|
||||
android:hint="Tên danh mục"
|
||||
android:inputType="text"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/black"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent=".8" />
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:weightSum="2"
|
||||
android:orientation="horizontal"
|
||||
android:layout_margin="20dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<info.hoang8f.widget.FButton
|
||||
android:id="@+id/btnSelect"
|
||||
android:text="Chọn ảnh..."
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_width="0dp"
|
||||
<com.rengwuxian.materialedittext.MaterialEditText
|
||||
android:id="@+id/edtName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_alignParentBottom="true"
|
||||
app:fButtonColor="@color/colorPrimary"
|
||||
app:shadowColor="@color/black"
|
||||
app:shadowEnabled="true"
|
||||
app:shadowHeight="5dp"
|
||||
app:cornerRadius="4dp"
|
||||
/>
|
||||
android:layout_marginTop="20dp"
|
||||
android:backgroundTint="#CCCCCC"
|
||||
android:drawableLeft="@drawable/ic_baseline_fastfood_24"
|
||||
android:drawablePadding="13dp"
|
||||
android:hint="Tên danh mục"
|
||||
android:inputType="text"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/black"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent=".8" />
|
||||
|
||||
<info.hoang8f.widget.FButton
|
||||
android:id="@+id/btnUpload"
|
||||
android:text="Tải ảnh lên"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_alignParentBottom="true"
|
||||
app:fButtonColor="@color/btnSignActive"
|
||||
app:shadowColor="@color/black"
|
||||
app:shadowEnabled="true"
|
||||
app:shadowHeight="5dp"
|
||||
app:cornerRadius="4dp"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:weightSum="2"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<info.hoang8f.widget.FButton
|
||||
android:id="@+id/btnSelect"
|
||||
android:text="Chọn ảnh..."
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_alignParentBottom="true"
|
||||
app:fButtonColor="@color/colorPrimary"
|
||||
app:shadowColor="@color/black"
|
||||
app:shadowEnabled="true"
|
||||
app:shadowHeight="5dp"
|
||||
app:cornerRadius="4dp"
|
||||
/>
|
||||
|
||||
<info.hoang8f.widget.FButton
|
||||
android:id="@+id/btnUpload"
|
||||
android:text="Tải ảnh lên"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_alignParentBottom="true"
|
||||
app:fButtonColor="@color/btnSignActive"
|
||||
app:shadowColor="@color/black"
|
||||
app:shadowEnabled="true"
|
||||
app:shadowHeight="5dp"
|
||||
app:cornerRadius="4dp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
Reference in New Issue
Block a user