Implement Banner UI
This commit is contained in:
parent
960f64ee81
commit
2803182a02
@ -6,6 +6,7 @@ import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.widget.ImageView;
|
||||
import android.view.animation.AccelerateDecelerateInterpolator;
|
||||
import android.view.WindowManager;
|
||||
import android.view.Menu;
|
||||
@ -378,14 +379,15 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
|
||||
// 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
|
||||
// Setup Banner Image
|
||||
ImageView bannerQris = findViewById(R.id.banner_qris);
|
||||
if (bannerQris != null) {
|
||||
bannerQris.setOnClickListener(v -> {
|
||||
// Pindah ke halaman QRIS
|
||||
startActivityWithAuth(new Intent(MainActivity.this, QrisActivity.class));
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ✅ NEW: Enhanced navigation method with payment type information and auth token
|
||||
|
@ -638,59 +638,32 @@
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/menu_grid"/>
|
||||
|
||||
<!-- Scan dan Bayar Card -->
|
||||
|
||||
<!-- Scan dan Bayar Banner -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardBackgroundColor="#E31937"
|
||||
app:cardCornerRadius="0dp"
|
||||
app:cardElevation="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_lainnya"
|
||||
app:layout_constraintVertical_bias="0">
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_lainnya">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/scan_bayar_content"
|
||||
<ImageView
|
||||
android:id="@+id/banner_qris"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_qr_code"
|
||||
app:tint="@android:color/white"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="16dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="SCAN DAN BAYAR"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Terima pembayaran dengan QRIS secara mudah"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="12sp"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/banner"
|
||||
android:contentDescription="Banner QRIS"/>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</ScrollView>
|
Loading…
x
Reference in New Issue
Block a user