Commit 9946f70e authored by Muhammad Suryono's avatar Muhammad Suryono

Merge sama iman

parents 4443b63a 4206e979
......@@ -75,7 +75,7 @@ public class MainActivity extends AppCompatActivity {
ProductAdapter adapter = new ProductAdapter();
binding.rvProduct.setAdapter(adapter);
binding.appBarUpdate.setVisibility(View.GONE);
// binding.appBarUpdate.setVisibility(View.GONE);
showLoading(true);
categoryAdapter = new CategoryAdapter();
......@@ -123,13 +123,13 @@ public class MainActivity extends AppCompatActivity {
status_update = true;
binding.topAppBar.setVisibility(View.GONE);
binding.rvCategory.setVisibility(View.GONE);
binding.appBarUpdate.setVisibility(View.VISIBLE);
MaterialToolbar toolbars = findViewById(R.id.appBarUpdate);
setSupportActionBar(toolbars);
// binding.appBarUpdate.setVisibility(View.VISIBLE);
// MaterialToolbar toolbars = findViewById(R.id.appBarUpdate);
// setSupportActionBar(toolbars);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setTitle("Update Product");
toolbars.setNavigationOnClickListener(view -> updateFinish());
// toolbars.setNavigationOnClickListener(view -> updateFinish());
productAdapter.notifyDataSetChanged();
}else if (id == R.id.create) {
......@@ -355,7 +355,7 @@ public class MainActivity extends AppCompatActivity {
status_update = false;
binding.topAppBar.setVisibility(View.VISIBLE);
binding.rvCategory.setVisibility(View.VISIBLE);
binding.appBarUpdate.setVisibility(View.GONE);
// binding.appBarUpdate.setVisibility(View.GONE);
productAdapter.notifyDataSetChanged();
}
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
<RelativeLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
......@@ -11,31 +11,23 @@
android:id="@+id/cAppBar"
layout="@layout/app_bar"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvCart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_above="@id/btCheckout"
android:layout_below="@id/cAppBar"
android:overScrollMode="never"
android:padding="1sp"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:layout_constraintBottom_toTopOf="@id/btCheckout"
app:layout_constraintTop_toBottomOf="@id/cAppBar"
app:layout_constraintVertical_bias="0.0"
tools:layout_editor_absoluteX="0dp"
tools:listitem="@layout/item_cart" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btCheckout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/title_checkout"
android:padding="15dp"
android:textSize="16sp"
android:layout_alignParentBottom="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
android:background="@color/colorPrimary"
android:gravity="center"
android:text="@string/title_checkout" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
</RelativeLayout>
......@@ -9,7 +9,7 @@
type="com.yono.messeripos.models.MainViewModels" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
......@@ -23,28 +23,16 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:paddingTop="20dp"
tools:ignore="RtlSymmetry">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/appBarUpdate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="0dp"
android:paddingTop="0dp"
android:background="@drawable/gradient"
style="@style/Widget.MaterialComponents.Toolbar.Primary"
xmlns:android="http://schemas.android.com/apk/res/android">
</com.google.android.material.appbar.MaterialToolbar>
android:paddingTop="20dp">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/topAppBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/gradient"
app:menu="@menu/home"
android:elevation="0dp"
app:navigationIcon="@mipmap/ic_meser_icon"
app:navigationIcon="@drawable/logo"
style="@style/Widget.MaterialComponents.Toolbar.Primary"
>
......@@ -67,11 +55,10 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvCategory"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginStart="5dp"
app:layout_constraintTop_toBottomOf="@id/topBar"
android:layout_marginTop="10dp"
tools:listitem="@layout/item_category" />
android:layout_height="wrap_content"
tools:listitem="@layout/item_category"
android:layout_below="@id/topBar"
android:layout_above="@id/imgEmpty"/>
<ImageView
android:id="@+id/imgEmpty"
......@@ -79,20 +66,18 @@
android:layout_height="wrap_content"
android:visibility="gone"
android:src="@drawable/no"
app:layout_constraintTop_toBottomOf="@id/rvCategory"/>
android:layout_below="@id/topBar"
android:foregroundGravity="center"/>
<ProgressBar
android:id="@+id/pbLoading"
android:indeterminateTint="@color/colorAccent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorAccent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
android:indeterminateTint="@color/colorAccent"
android:layout_centerInParent="true"/>
<!-- Scrollable content -->
<!-- Scrollable content -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvProduct"
android:layout_width="match_parent"
......@@ -101,11 +86,9 @@
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="2"
android:layout_marginHorizontal="5dp"
app:layout_constraintTop_toBottomOf="@id/rvCategory"
tools:listitem="@layout/item_list"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
android:layout_below="@id/rvCategory"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>
</layout>
\ No newline at end of file
......@@ -10,59 +10,53 @@
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_height="40dp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginEnd="5dp">
android:paddingVertical="10dp"
android:layout_marginHorizontal="3dp">
<com.google.android.material.card.MaterialCardView
android:id="@+id/cvCategory"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="#2041B8"
android:clickable="true"
android:focusable="true"
android:checkable="true"
app:cardCornerRadius="40dp">
app:cardCornerRadius="50dp"
android:clipToPadding="true"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content"
android:paddingHorizontal="20dp">
<ImageView
android:id="@+id/image_cat"
android:layout_width="30dp"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:src="@drawable/ic_meser"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.06"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
tools:ignore="MissingConstraints" />
android:src="@drawable/ic_meser"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="40dp"
android:fontFamily="@font/roboto"
android:text="@{category.nameCategory}"
android:textStyle="bold"
android:textSize="20sp"
android:textColor="#fff"
tools:text="@tools:sample/full_names"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/image_cat"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints" />
tools:text="elizabeth"
android:layout_toRightOf="@id/image_cat"
android:layout_centerInParent="true"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment