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