adjustment
This commit is contained in:
parent
2a24016637
commit
1799e7eb0e
@ -21,23 +21,24 @@ import com.google.android.material.button.MaterialButton;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
private boolean isExpanded = false;
|
||||
private CardView cardBantuan, cardInfoToko;
|
||||
private boolean isExpanded = false; // False = showing only 9 main menus, True = showing all 15 menus
|
||||
private MaterialButton btnLainnya;
|
||||
|
||||
@Override
|
||||
public void onWindowFocusChanged(boolean hasFocus) {
|
||||
super.onWindowFocusChanged(hasFocus);
|
||||
if (hasFocus) {
|
||||
getWindow().getDecorView().setSystemUiVisibility(
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
||||
| View.SYSTEM_UI_FLAG_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
|
||||
super.onWindowFocusChanged(hasFocus);
|
||||
if (hasFocus) {
|
||||
getWindow().getDecorView().setSystemUiVisibility(
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
||||
| View.SYSTEM_UI_FLAG_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
// Enable hardware acceleration for smoother scrolling
|
||||
getWindow().setFlags(
|
||||
@ -56,91 +57,211 @@ public class MainActivity extends AppCompatActivity {
|
||||
});
|
||||
|
||||
// Initialize views
|
||||
cardBantuan = findViewById(R.id.card_bantuan);
|
||||
cardInfoToko = findViewById(R.id.card_info_toko);
|
||||
btnLainnya = findViewById(R.id.btn_lainnya);
|
||||
|
||||
// Check if we're returning from a completed transaction
|
||||
checkTransactionCompletion();
|
||||
|
||||
// Setup initial state - 9 main menus visible, 6 dummy menus hidden
|
||||
setupInitialMenuState();
|
||||
|
||||
// Setup menu listeners
|
||||
setupMenuListeners();
|
||||
}
|
||||
|
||||
private void setupInitialMenuState() {
|
||||
// 9 main menus should always be visible
|
||||
CardView cardBantuan = findViewById(R.id.card_bantuan);
|
||||
CardView cardInfoToko = findViewById(R.id.card_info_toko);
|
||||
|
||||
if (cardBantuan != null) {
|
||||
cardBantuan.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (cardInfoToko != null) {
|
||||
cardInfoToko.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
// 6 dummy menus should be hidden initially
|
||||
CardView[] dummyCards = {
|
||||
findViewById(R.id.card_dummy_menu_1),
|
||||
findViewById(R.id.card_dummy_menu_2),
|
||||
findViewById(R.id.card_dummy_menu_3),
|
||||
findViewById(R.id.card_dummy_menu_4),
|
||||
findViewById(R.id.card_dummy_menu_5),
|
||||
findViewById(R.id.card_dummy_menu_6)
|
||||
};
|
||||
|
||||
for (CardView card : dummyCards) {
|
||||
if (card != null) {
|
||||
card.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
// Set initial button text
|
||||
isExpanded = false;
|
||||
btnLainnya.setText("Lainnya");
|
||||
}
|
||||
|
||||
private void checkTransactionCompletion() {
|
||||
Intent intent = getIntent();
|
||||
if (intent != null) {
|
||||
boolean transactionCompleted = intent.getBooleanExtra("transaction_completed", false);
|
||||
String transactionAmount = intent.getStringExtra("transaction_amount");
|
||||
|
||||
if (transactionCompleted) {
|
||||
if (transactionAmount != null) {
|
||||
Toast.makeText(this, "Transaksi berhasil! Jumlah: Rp " + formatCurrency(transactionAmount), Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
Toast.makeText(this, "Transaksi berhasil diselesaikan!", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String formatCurrency(String amount) {
|
||||
try {
|
||||
long amountValue = Long.parseLong(amount);
|
||||
return String.format("%,d", amountValue).replace(',', '.');
|
||||
} catch (NumberFormatException e) {
|
||||
return amount;
|
||||
}
|
||||
}
|
||||
|
||||
private void setupMenuListeners() {
|
||||
// Card IDs to set up listeners
|
||||
// Card IDs to set up listeners - Total 15 menu items
|
||||
int[] cardIds = {
|
||||
// Row 1 (Always visible - 3 items)
|
||||
R.id.card_kartu_kredit,
|
||||
R.id.card_kartu_debit,
|
||||
R.id.card_qris,
|
||||
R.id.card_transfer,
|
||||
// Row 2 (Always visible - 3 items)
|
||||
R.id.card_uang_elektronik,
|
||||
R.id.card_cetak_ulang,
|
||||
R.id.card_refund,
|
||||
R.id.card_settlement,
|
||||
// Row 3 (Always visible - 3 items)
|
||||
R.id.card_histori,
|
||||
R.id.card_bantuan,
|
||||
R.id.card_info_toko
|
||||
R.id.card_info_toko,
|
||||
// Row 4 (Hidden initially - 3 items)
|
||||
R.id.card_dummy_menu_1,
|
||||
R.id.card_dummy_menu_2,
|
||||
R.id.card_dummy_menu_3,
|
||||
// Row 5 (Hidden initially - 3 items)
|
||||
R.id.card_dummy_menu_4,
|
||||
R.id.card_dummy_menu_5,
|
||||
R.id.card_dummy_menu_6
|
||||
};
|
||||
|
||||
// Set up click listeners for all cards
|
||||
for (int cardId : cardIds) {
|
||||
CardView cardView = findViewById(cardId);
|
||||
cardView.setOnClickListener(v -> {
|
||||
if (cardId == R.id.card_kartu_kredit) {
|
||||
startActivity(new Intent(MainActivity.this, PaymentActivity.class));
|
||||
} else if (cardId == R.id.card_kartu_debit) {
|
||||
startActivity(new Intent(MainActivity.this, PaymentActivity.class));
|
||||
} else if (cardId == R.id.card_qris) {
|
||||
startActivity(new Intent(MainActivity.this, QrisActivity.class));
|
||||
} else if (cardId == R.id.card_bantuan) {
|
||||
startActivity(new Intent(MainActivity.this, TransactionActivity.class));
|
||||
} else if (cardId == R.id.card_info_toko) {
|
||||
Toast.makeText(this, "Info Toko Diklik", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
// Simplified version - just show the card ID
|
||||
Toast.makeText(this, "Menu Diklik: " + cardId, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
if (cardView != null) {
|
||||
cardView.setOnClickListener(v -> {
|
||||
if (cardId == R.id.card_kartu_kredit) {
|
||||
startActivity(new Intent(MainActivity.this, PaymentActivity.class));
|
||||
} else if (cardId == R.id.card_kartu_debit) {
|
||||
startActivity(new Intent(MainActivity.this, PaymentActivity.class));
|
||||
} else if (cardId == R.id.card_qris) {
|
||||
startActivity(new Intent(MainActivity.this, QrisActivity.class));
|
||||
} else if (cardId == R.id.card_uang_elektronik) {
|
||||
startActivity(new Intent(MainActivity.this, PaymentActivity.class));
|
||||
} else if (cardId == R.id.card_cetak_ulang) {
|
||||
startActivity(new Intent(MainActivity.this, TransactionActivity.class));
|
||||
} else if (cardId == R.id.card_settlement) {
|
||||
Toast.makeText(this, "Settlement - Coming Soon", Toast.LENGTH_SHORT).show();
|
||||
} else if (cardId == R.id.card_histori) {
|
||||
Toast.makeText(this, "Histori - Coming Soon", Toast.LENGTH_SHORT).show();
|
||||
} else if (cardId == R.id.card_bantuan) {
|
||||
Toast.makeText(this, "Bantuan - Coming Soon", Toast.LENGTH_SHORT).show();
|
||||
} else if (cardId == R.id.card_info_toko) {
|
||||
Toast.makeText(this, "Info Toko - Coming Soon", Toast.LENGTH_SHORT).show();
|
||||
} else if (cardId == R.id.card_dummy_menu_1) {
|
||||
Toast.makeText(this, "Dummy Menu 1 - Coming Soon", Toast.LENGTH_SHORT).show();
|
||||
} else if (cardId == R.id.card_dummy_menu_2) {
|
||||
Toast.makeText(this, "Dummy Menu 2 - Coming Soon", Toast.LENGTH_SHORT).show();
|
||||
} else if (cardId == R.id.card_dummy_menu_3) {
|
||||
Toast.makeText(this, "Dummy Menu 3 - Coming Soon", Toast.LENGTH_SHORT).show();
|
||||
} else if (cardId == R.id.card_dummy_menu_4) {
|
||||
Toast.makeText(this, "Dummy Menu 4 - Coming Soon", Toast.LENGTH_SHORT).show();
|
||||
} else if (cardId == R.id.card_dummy_menu_5) {
|
||||
Toast.makeText(this, "Dummy Menu 5 - Coming Soon", Toast.LENGTH_SHORT).show();
|
||||
} else if (cardId == R.id.card_dummy_menu_6) {
|
||||
Toast.makeText(this, "Dummy Menu 6 - Coming Soon", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
// Fallback for any other cards
|
||||
Toast.makeText(this, "Menu Diklik: " + getResources().getResourceEntryName(cardId), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Get references to ONLY the dummy cards that need to be toggled
|
||||
CardView[] toggleableCards = {
|
||||
findViewById(R.id.card_dummy_menu_1),
|
||||
findViewById(R.id.card_dummy_menu_2),
|
||||
findViewById(R.id.card_dummy_menu_3),
|
||||
findViewById(R.id.card_dummy_menu_4),
|
||||
findViewById(R.id.card_dummy_menu_5),
|
||||
findViewById(R.id.card_dummy_menu_6)
|
||||
};
|
||||
|
||||
// Set up "Lainnya" button click listener
|
||||
btnLainnya.setOnClickListener(v -> {
|
||||
isExpanded = !isExpanded;
|
||||
|
||||
if (isExpanded) {
|
||||
// Show additional menus with animation
|
||||
cardBantuan.setVisibility(View.VISIBLE);
|
||||
cardInfoToko.setVisibility(View.VISIBLE);
|
||||
cardBantuan.setAlpha(0f);
|
||||
cardInfoToko.setAlpha(0f);
|
||||
|
||||
cardBantuan.animate()
|
||||
.alpha(1f)
|
||||
.setDuration(300)
|
||||
.setInterpolator(new AccelerateDecelerateInterpolator())
|
||||
.start();
|
||||
|
||||
cardInfoToko.animate()
|
||||
.alpha(1f)
|
||||
.setDuration(300)
|
||||
.setInterpolator(new AccelerateDecelerateInterpolator())
|
||||
.start();
|
||||
|
||||
// Show the 6 dummy menus with animation
|
||||
for (CardView card : toggleableCards) {
|
||||
if (card != null) {
|
||||
card.setVisibility(View.VISIBLE);
|
||||
card.setAlpha(0f);
|
||||
card.animate()
|
||||
.alpha(1f)
|
||||
.setDuration(300)
|
||||
.setInterpolator(new AccelerateDecelerateInterpolator())
|
||||
.start();
|
||||
}
|
||||
}
|
||||
btnLainnya.setText("Tampilkan Lebih Sedikit");
|
||||
} else {
|
||||
// Hide additional menus with animation
|
||||
cardBantuan.animate()
|
||||
.alpha(0f)
|
||||
.setDuration(300)
|
||||
.setInterpolator(new AccelerateDecelerateInterpolator())
|
||||
.withEndAction(() -> cardBantuan.setVisibility(View.GONE))
|
||||
.start();
|
||||
|
||||
cardInfoToko.animate()
|
||||
.alpha(0f)
|
||||
.setDuration(300)
|
||||
.setInterpolator(new AccelerateDecelerateInterpolator())
|
||||
.withEndAction(() -> cardInfoToko.setVisibility(View.GONE))
|
||||
.start();
|
||||
|
||||
// Hide the 6 dummy menus with animation
|
||||
for (CardView card : toggleableCards) {
|
||||
if (card != null) {
|
||||
card.animate()
|
||||
.alpha(0f)
|
||||
.setDuration(300)
|
||||
.setInterpolator(new AccelerateDecelerateInterpolator())
|
||||
.withEndAction(() -> card.setVisibility(View.GONE))
|
||||
.start();
|
||||
}
|
||||
}
|
||||
btnLainnya.setText("Lainnya");
|
||||
}
|
||||
});
|
||||
|
||||
// Set up scan dan bayar card click listener
|
||||
LinearLayout scanBayarContent = findViewById(R.id.scan_bayar_content);
|
||||
if (scanBayarContent != null) {
|
||||
scanBayarContent.setOnClickListener(v -> {
|
||||
// Navigate to QRIS payment activity
|
||||
startActivity(new Intent(MainActivity.this, QrisActivity.class));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewIntent(Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
setIntent(intent);
|
||||
// Check for transaction completion when returning to MainActivity
|
||||
checkTransactionCompletion();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
// Clear any transaction completion flags to avoid repeated messages
|
||||
getIntent().removeExtra("transaction_completed");
|
||||
getIntent().removeExtra("transaction_amount");
|
||||
}
|
||||
}
|
BIN
app/src/main/res/drawable/ic_help.png
Normal file
BIN
app/src/main/res/drawable/ic_help.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
BIN
app/src/main/res/drawable/ic_store_info.png
Normal file
BIN
app/src/main/res/drawable/ic_store_info.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
@ -111,12 +111,12 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="3"
|
||||
android:rowCount="3"
|
||||
android:rowCount="5"
|
||||
android:background="@android:color/white"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/merchant_card">
|
||||
|
||||
<!-- Kartu Kredit -->
|
||||
<!-- Row 1: Kartu Kredit, Kartu Debit, QRIS -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_kartu_kredit"
|
||||
android:layout_width="0dp"
|
||||
@ -150,7 +150,6 @@
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Kartu Debit -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_kartu_debit"
|
||||
android:layout_width="0dp"
|
||||
@ -184,7 +183,6 @@
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- QRIS -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_qris"
|
||||
android:layout_width="0dp"
|
||||
@ -218,41 +216,7 @@
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Transfer -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_transfer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_rowWeight="1"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="#F3F4F3">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_transfer"
|
||||
android:tint="#E31937"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Transfer"
|
||||
style="@style/MenuCardTitle"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Uang Elektronik -->
|
||||
<!-- Row 2: Uang Elektronik, Cetak Ulang, Settlement -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_uang_elektronik"
|
||||
android:layout_width="0dp"
|
||||
@ -286,7 +250,6 @@
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Cetak Ulang -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_cetak_ulang"
|
||||
android:layout_width="0dp"
|
||||
@ -320,41 +283,6 @@
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Refund -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_refund"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_rowWeight="1"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="#F3F4F3">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_refund"
|
||||
android:tint="#E31937"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Refund"
|
||||
style="@style/MenuCardTitle"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Settlement -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_settlement"
|
||||
android:layout_width="0dp"
|
||||
@ -388,7 +316,7 @@
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Histori -->
|
||||
<!-- Row 3: Histori, Bantuan, Info Toko -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_histori"
|
||||
android:layout_width="0dp"
|
||||
@ -422,7 +350,6 @@
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Bantuan -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_bantuan"
|
||||
android:layout_width="0dp"
|
||||
@ -430,7 +357,7 @@
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_rowWeight="1"
|
||||
android:layout_margin="8dp"
|
||||
android:visibility="gone"
|
||||
android:visibility="visible"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="#F3F4F3">
|
||||
@ -445,7 +372,7 @@
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_qr_code"
|
||||
android:src="@drawable/ic_help"
|
||||
android:tint="#E31937"/>
|
||||
|
||||
<TextView
|
||||
@ -457,7 +384,6 @@
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Info Toko -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_info_toko"
|
||||
android:layout_width="0dp"
|
||||
@ -465,6 +391,41 @@
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_rowWeight="1"
|
||||
android:layout_margin="8dp"
|
||||
android:visibility="visible"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="#F3F4F3">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_store_info"
|
||||
android:tint="#E31937"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Info Toko"
|
||||
style="@style/MenuCardTitle"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Row 4: Dummy Menu 1, 2, 3 (Hidden initially) -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_dummy_menu_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_rowWeight="1"
|
||||
android:layout_margin="8dp"
|
||||
android:visibility="gone"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="2dp"
|
||||
@ -487,10 +448,182 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Info Toko"
|
||||
android:text="Dummy Menu 1"
|
||||
style="@style/MenuCardTitle"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_dummy_menu_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_rowWeight="1"
|
||||
android:layout_margin="8dp"
|
||||
android:visibility="gone"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="#F3F4F3">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_qr_code"
|
||||
android:tint="#E31937"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Dummy Menu 2"
|
||||
style="@style/MenuCardTitle"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_dummy_menu_3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_rowWeight="1"
|
||||
android:layout_margin="8dp"
|
||||
android:visibility="gone"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="#F3F4F3">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_qr_code"
|
||||
android:tint="#E31937"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Dummy Menu 3"
|
||||
style="@style/MenuCardTitle"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Row 5: Dummy Menu 4, 5, 6 (Hidden initially) -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_dummy_menu_4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_rowWeight="1"
|
||||
android:layout_margin="8dp"
|
||||
android:visibility="gone"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="#F3F4F3">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_qr_code"
|
||||
android:tint="#E31937"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Dummy Menu 4"
|
||||
style="@style/MenuCardTitle"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_dummy_menu_5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_rowWeight="1"
|
||||
android:layout_margin="8dp"
|
||||
android:visibility="gone"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="#F3F4F3">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_qr_code"
|
||||
android:tint="#E31937"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Dummy Menu 5"
|
||||
style="@style/MenuCardTitle"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_dummy_menu_6"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_rowWeight="1"
|
||||
android:layout_margin="8dp"
|
||||
android:visibility="gone"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="#F3F4F3">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_qr_code"
|
||||
android:tint="#E31937"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Dummy Menu 6"
|
||||
style="@style/MenuCardTitle"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</GridLayout>
|
||||
|
||||
<!-- Lainnya Button -->
|
||||
@ -498,7 +631,7 @@
|
||||
android:id="@+id/btn_lainnya"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Lainnya"
|
||||
android:text="Tampilkan Lebih Sedikit"
|
||||
android:textColor="#DE0701"
|
||||
android:backgroundTint="#FFFFFF"
|
||||
android:textAllCaps="false"
|
||||
|
Loading…
x
Reference in New Issue
Block a user