Commit 2dfa5897 authored by Alfansyah Fadlian's avatar Alfansyah Fadlian

dashboard fixed layout

parent 73509f20
...@@ -96,7 +96,6 @@ public class MainActivity extends AppCompatActivity { ...@@ -96,7 +96,6 @@ public class MainActivity extends AppCompatActivity {
showLoading(true); showLoading(true);
btnAddCart = findViewById(R.id.materialBtnAddCart); btnAddCart = findViewById(R.id.materialBtnAddCart);
binding.tvCategory.setVisibility(View.GONE);
binding.tvProduct.setVisibility(View.GONE); binding.tvProduct.setVisibility(View.GONE);
categoryAdapter = new CategoryAdapter(); categoryAdapter = new CategoryAdapter();
...@@ -188,7 +187,6 @@ public class MainActivity extends AppCompatActivity { ...@@ -188,7 +187,6 @@ public class MainActivity extends AppCompatActivity {
categoryModels.add(0,caModels); categoryModels.add(0,caModels);
categoryModelsArrayList.addAll(categoryModels); categoryModelsArrayList.addAll(categoryModels);
binding.tvCategory.setVisibility(View.VISIBLE);
binding.tvProduct.setVisibility(View.VISIBLE); binding.tvProduct.setVisibility(View.VISIBLE);
categoryAdapter.setCategoriAdapter(MainActivity.this, categoryModelsArrayList); categoryAdapter.setCategoriAdapter(MainActivity.this, categoryModelsArrayList);
binding.rvCategory.setLayoutManager(new LinearLayoutManager( binding.rvCategory.setLayoutManager(new LinearLayoutManager(
......
...@@ -50,22 +50,15 @@ ...@@ -50,22 +50,15 @@
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<TextView
android:id="@+id/tvCategory"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/topBar"
android:textColor="@android:color/black"
android:textSize="18sp"
android:textAllCaps="true"
android:layout_margin="5dp"
android:text="Category"/>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvCategory" android:id="@+id/rvCategory"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/tvCategory"/> android:layout_below="@+id/topBar"
android:layout_alignParentEnd="true"
android:paddingTop="10dp"
android:layout_marginEnd="0dp" />
<ImageView <ImageView
android:id="@+id/imgEmpty" android:id="@+id/imgEmpty"
...@@ -95,8 +88,7 @@ ...@@ -95,8 +88,7 @@
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:textSize="18sp" android:textSize="18sp"
android:textAllCaps="true" android:textAllCaps="true"
android:layout_margin="5dp" android:layout_margin="5dp" />
android:text="Product"/>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvProduct" android:id="@+id/rvProduct"
......
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