improve page struct
This commit is contained in:
		
							parent
							
								
									191966a2e4
								
							
						
					
					
						commit
						459d9ab0f1
					
				@ -36,8 +36,8 @@ public class ReceiptActivity extends AppCompatActivity {
 | 
				
			|||||||
    private TextView finalTotal;
 | 
					    private TextView finalTotal;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    // Action buttons
 | 
					    // Action buttons
 | 
				
			||||||
    private Button printButton;
 | 
					    private LinearLayout printButton;
 | 
				
			||||||
    private Button emailButton;
 | 
					    private LinearLayout emailButton;
 | 
				
			||||||
    private Button finishButton;
 | 
					    private Button finishButton;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
@ -88,7 +88,7 @@ public class ReceiptActivity extends AppCompatActivity {
 | 
				
			|||||||
        serviceFee = findViewById(R.id.service_fee);
 | 
					        serviceFee = findViewById(R.id.service_fee);
 | 
				
			||||||
        finalTotal = findViewById(R.id.final_total);
 | 
					        finalTotal = findViewById(R.id.final_total);
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        // Action buttons
 | 
					        // Action buttons - Updated to LinearLayout
 | 
				
			||||||
        printButton = findViewById(R.id.print_button);
 | 
					        printButton = findViewById(R.id.print_button);
 | 
				
			||||||
        emailButton = findViewById(R.id.email_button);
 | 
					        emailButton = findViewById(R.id.email_button);
 | 
				
			||||||
        finishButton = findViewById(R.id.finish_button);
 | 
					        finishButton = findViewById(R.id.finish_button);
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										9
									
								
								app/src/main/res/drawable/button_finish_background.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								app/src/main/res/drawable/button_finish_background.xml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<shape xmlns:android="http://schemas.android.com/apk/res/android"
 | 
				
			||||||
 | 
					    android:shape="rectangle">
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    <solid android:color="#3498DB" />
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    <corners android:radius="8dp" />
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					</shape>
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								app/src/main/res/drawable/ic_email.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								app/src/main/res/drawable/ic_email.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 1.1 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/res/drawable/ic_print.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								app/src/main/res/drawable/ic_print.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 586 B  | 
@ -13,7 +13,7 @@
 | 
				
			|||||||
    <androidx.constraintlayout.widget.ConstraintLayout
 | 
					    <androidx.constraintlayout.widget.ConstraintLayout
 | 
				
			||||||
        android:layout_width="match_parent"
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
        android:layout_height="match_parent"
 | 
					        android:layout_height="match_parent"
 | 
				
			||||||
        android:background="#FFFFFF"
 | 
					        android:background="#F5F5F5"
 | 
				
			||||||
        tools:context=".ReceiptActivity">
 | 
					        tools:context=".ReceiptActivity">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <!-- Red Status Bar (Override purple) -->
 | 
					        <!-- Red Status Bar (Override purple) -->
 | 
				
			||||||
@ -28,7 +28,7 @@
 | 
				
			|||||||
        <View
 | 
					        <View
 | 
				
			||||||
            android:id="@+id/red_header_background"
 | 
					            android:id="@+id/red_header_background"
 | 
				
			||||||
            android:layout_width="match_parent"
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
            android:layout_height="80dp"
 | 
					            android:layout_height="120dp"
 | 
				
			||||||
            android:background="#E31937"
 | 
					            android:background="#E31937"
 | 
				
			||||||
            app:layout_constraintTop_toBottomOf="@id/red_status_bar"/>
 | 
					            app:layout_constraintTop_toBottomOf="@id/red_status_bar"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -40,18 +40,19 @@
 | 
				
			|||||||
            android:orientation="horizontal"
 | 
					            android:orientation="horizontal"
 | 
				
			||||||
            android:gravity="center_vertical"
 | 
					            android:gravity="center_vertical"
 | 
				
			||||||
            android:layout_marginStart="16dp"
 | 
					            android:layout_marginStart="16dp"
 | 
				
			||||||
 | 
					            android:layout_marginTop="16dp"
 | 
				
			||||||
            android:background="?attr/selectableItemBackgroundBorderless"
 | 
					            android:background="?attr/selectableItemBackgroundBorderless"
 | 
				
			||||||
            android:padding="8dp"
 | 
					            android:padding="8dp"
 | 
				
			||||||
            app:layout_constraintStart_toStartOf="parent"
 | 
					            app:layout_constraintStart_toStartOf="parent"
 | 
				
			||||||
            app:layout_constraintTop_toBottomOf="@id/red_status_bar"
 | 
					            app:layout_constraintTop_toBottomOf="@id/red_status_bar">
 | 
				
			||||||
            app:layout_constraintBottom_toBottomOf="@id/red_header_background">
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <!-- Back Arrow -->
 | 
					            <!-- Back Arrow -->
 | 
				
			||||||
            <ImageView
 | 
					            <ImageView
 | 
				
			||||||
                android:id="@+id/backArrow"
 | 
					                android:id="@+id/backArrow"
 | 
				
			||||||
                android:layout_width="16dp"
 | 
					                android:layout_width="20dp"
 | 
				
			||||||
                android:layout_height="16dp"
 | 
					                android:layout_height="20dp"
 | 
				
			||||||
                android:src="@drawable/ic_arrow_back"
 | 
					                android:src="@drawable/ic_arrow_back"
 | 
				
			||||||
 | 
					                android:tint="@android:color/white"
 | 
				
			||||||
                android:contentDescription="Kembali" />
 | 
					                android:contentDescription="Kembali" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <!-- Title Text -->
 | 
					            <!-- Title Text -->
 | 
				
			||||||
@ -62,22 +63,22 @@
 | 
				
			|||||||
                android:layout_marginStart="8dp"
 | 
					                android:layout_marginStart="8dp"
 | 
				
			||||||
                android:text="Kembali"
 | 
					                android:text="Kembali"
 | 
				
			||||||
                android:textColor="@android:color/white"
 | 
					                android:textColor="@android:color/white"
 | 
				
			||||||
                android:textSize="14sp"
 | 
					                android:textSize="16sp"
 | 
				
			||||||
                android:fontFamily="@font/inter"/>
 | 
					                android:fontFamily="@font/inter"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        </LinearLayout>
 | 
					        </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <!-- Receipt Card -->
 | 
					        <!-- Receipt Card - Positioned to overlap header by half -->
 | 
				
			||||||
        <androidx.cardview.widget.CardView
 | 
					        <androidx.cardview.widget.CardView
 | 
				
			||||||
            android:id="@+id/receipt_card"
 | 
					            android:id="@+id/receipt_card"
 | 
				
			||||||
            android:layout_width="match_parent"
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
            android:layout_height="wrap_content"
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
            android:layout_margin="16dp"
 | 
					            android:layout_marginHorizontal="16dp"
 | 
				
			||||||
            android:layout_marginTop="8dp"
 | 
					            android:layout_marginTop="60dp"
 | 
				
			||||||
            app:cardBackgroundColor="@android:color/white"
 | 
					            app:cardBackgroundColor="@android:color/white"
 | 
				
			||||||
            app:cardCornerRadius="12dp"
 | 
					            app:cardCornerRadius="12dp"
 | 
				
			||||||
            app:cardElevation="4dp"
 | 
					            app:cardElevation="8dp"
 | 
				
			||||||
            app:layout_constraintTop_toBottomOf="@id/red_header_background">
 | 
					            app:layout_constraintTop_toBottomOf="@id/red_status_bar">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <LinearLayout
 | 
					            <LinearLayout
 | 
				
			||||||
                android:layout_width="match_parent"
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
@ -94,6 +95,12 @@
 | 
				
			|||||||
                    android:layout_marginBottom="16dp">
 | 
					                    android:layout_marginBottom="16dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    <!-- EDC Merchant Logo/Text -->
 | 
					                    <!-- EDC Merchant Logo/Text -->
 | 
				
			||||||
 | 
					                    <LinearLayout
 | 
				
			||||||
 | 
					                        android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                        android:orientation="horizontal"
 | 
				
			||||||
 | 
					                        android:gravity="center_vertical">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        <TextView
 | 
					                        <TextView
 | 
				
			||||||
                            android:layout_width="wrap_content"
 | 
					                            android:layout_width="wrap_content"
 | 
				
			||||||
                            android:layout_height="wrap_content"
 | 
					                            android:layout_height="wrap_content"
 | 
				
			||||||
@ -108,10 +115,12 @@
 | 
				
			|||||||
                            android:layout_height="wrap_content"
 | 
					                            android:layout_height="wrap_content"
 | 
				
			||||||
                            android:text="Merchant"
 | 
					                            android:text="Merchant"
 | 
				
			||||||
                            android:textColor="#3F51B5"
 | 
					                            android:textColor="#3F51B5"
 | 
				
			||||||
                        android:textSize="20sp"
 | 
					                            android:textSize="24sp"
 | 
				
			||||||
                            android:textStyle="bold"
 | 
					                            android:textStyle="bold"
 | 
				
			||||||
                            android:fontFamily="@font/inter"/>
 | 
					                            android:fontFamily="@font/inter"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    <TextView
 | 
					                    <TextView
 | 
				
			||||||
                        android:layout_width="wrap_content"
 | 
					                        android:layout_width="wrap_content"
 | 
				
			||||||
                        android:layout_height="wrap_content"
 | 
					                        android:layout_height="wrap_content"
 | 
				
			||||||
@ -119,7 +128,7 @@
 | 
				
			|||||||
                        android:textColor="#333333"
 | 
					                        android:textColor="#333333"
 | 
				
			||||||
                        android:textSize="12sp"
 | 
					                        android:textSize="12sp"
 | 
				
			||||||
                        android:fontFamily="@font/inter"
 | 
					                        android:fontFamily="@font/inter"
 | 
				
			||||||
                        android:layout_marginTop="4dp"/>
 | 
					                        android:layout_marginTop="2dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                </LinearLayout>
 | 
					                </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -443,57 +452,93 @@
 | 
				
			|||||||
            </LinearLayout>
 | 
					            </LinearLayout>
 | 
				
			||||||
        </androidx.cardview.widget.CardView>
 | 
					        </androidx.cardview.widget.CardView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <!-- Action Buttons -->
 | 
					        <!-- Action Buttons (Print & Email) -->
 | 
				
			||||||
        <LinearLayout
 | 
					        <LinearLayout
 | 
				
			||||||
 | 
					            android:id="@+id/action_buttons_container"
 | 
				
			||||||
            android:layout_width="match_parent"
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
            android:layout_height="wrap_content"
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
            android:orientation="horizontal"
 | 
					            android:orientation="horizontal"
 | 
				
			||||||
            android:layout_margin="16dp"
 | 
					            android:layout_marginHorizontal="16dp"
 | 
				
			||||||
            android:layout_marginTop="8dp"
 | 
					            android:layout_marginTop="24dp"
 | 
				
			||||||
            app:layout_constraintTop_toBottomOf="@id/receipt_card">
 | 
					            app:layout_constraintTop_toBottomOf="@id/receipt_card">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <!-- Print Button -->
 | 
					            <!-- Print Button -->
 | 
				
			||||||
            <Button
 | 
					            <LinearLayout
 | 
				
			||||||
                android:id="@+id/print_button"
 | 
					                android:id="@+id/print_button"
 | 
				
			||||||
                android:layout_width="0dp"
 | 
					                android:layout_width="0dp"
 | 
				
			||||||
                android:layout_height="48dp"
 | 
					                android:layout_height="56dp"
 | 
				
			||||||
                android:layout_weight="1"
 | 
					                android:layout_weight="1"
 | 
				
			||||||
                android:layout_marginEnd="8dp"
 | 
					                android:layout_marginEnd="8dp"
 | 
				
			||||||
                android:text="📄 Cetak Ulang"
 | 
					                android:orientation="horizontal"
 | 
				
			||||||
 | 
					                android:gravity="center"
 | 
				
			||||||
 | 
					                android:background="@drawable/button_secondary_background"
 | 
				
			||||||
 | 
					                android:clickable="true"
 | 
				
			||||||
 | 
					                android:focusable="true">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <ImageView
 | 
				
			||||||
 | 
					                    android:layout_width="20dp"
 | 
				
			||||||
 | 
					                    android:layout_height="20dp"
 | 
				
			||||||
 | 
					                    android:src="@drawable/ic_print"
 | 
				
			||||||
 | 
					                    android:tint="#666666"
 | 
				
			||||||
 | 
					                    android:layout_marginEnd="8dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="Cetak Ulang"
 | 
				
			||||||
                    android:textColor="#666666"
 | 
					                    android:textColor="#666666"
 | 
				
			||||||
                    android:textSize="14sp"
 | 
					                    android:textSize="14sp"
 | 
				
			||||||
                android:background="@drawable/button_secondary_background"
 | 
					 | 
				
			||||||
                    android:fontFamily="@font/inter"/>
 | 
					                    android:fontFamily="@font/inter"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <!-- Email Button -->
 | 
					            <!-- Email Button -->
 | 
				
			||||||
            <Button
 | 
					            <LinearLayout
 | 
				
			||||||
                android:id="@+id/email_button"
 | 
					                android:id="@+id/email_button"
 | 
				
			||||||
                android:layout_width="0dp"
 | 
					                android:layout_width="0dp"
 | 
				
			||||||
                android:layout_height="48dp"
 | 
					                android:layout_height="56dp"
 | 
				
			||||||
                android:layout_weight="1"
 | 
					                android:layout_weight="1"
 | 
				
			||||||
                android:layout_marginStart="8dp"
 | 
					                android:layout_marginStart="8dp"
 | 
				
			||||||
                android:text="📧 Email"
 | 
					                android:orientation="horizontal"
 | 
				
			||||||
 | 
					                android:gravity="center"
 | 
				
			||||||
 | 
					                android:background="@drawable/button_secondary_background"
 | 
				
			||||||
 | 
					                android:clickable="true"
 | 
				
			||||||
 | 
					                android:focusable="true">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <ImageView
 | 
				
			||||||
 | 
					                    android:layout_width="20dp"
 | 
				
			||||||
 | 
					                    android:layout_height="20dp"
 | 
				
			||||||
 | 
					                    android:src="@drawable/ic_email"
 | 
				
			||||||
 | 
					                    android:tint="#666666"
 | 
				
			||||||
 | 
					                    android:layout_marginEnd="8dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="Email"
 | 
				
			||||||
                    android:textColor="#666666"
 | 
					                    android:textColor="#666666"
 | 
				
			||||||
                    android:textSize="14sp"
 | 
					                    android:textSize="14sp"
 | 
				
			||||||
                android:background="@drawable/button_secondary_background"
 | 
					 | 
				
			||||||
                    android:fontFamily="@font/inter"/>
 | 
					                    android:fontFamily="@font/inter"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            </LinearLayout>
 | 
					            </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <!-- Finish Button -->
 | 
					        <!-- Finish Button -->
 | 
				
			||||||
        <Button
 | 
					        <Button
 | 
				
			||||||
            android:id="@+id/finish_button"
 | 
					            android:id="@+id/finish_button"
 | 
				
			||||||
            android:layout_width="match_parent"
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
            android:layout_height="48dp"
 | 
					            android:layout_height="56dp"
 | 
				
			||||||
            android:layout_margin="16dp"
 | 
					            android:layout_marginHorizontal="16dp"
 | 
				
			||||||
            android:layout_marginTop="8dp"
 | 
					            android:layout_marginTop="16dp"
 | 
				
			||||||
 | 
					            android:layout_marginBottom="24dp"
 | 
				
			||||||
            android:text="Selesai"
 | 
					            android:text="Selesai"
 | 
				
			||||||
            android:textColor="@android:color/white"
 | 
					            android:textColor="@android:color/white"
 | 
				
			||||||
            android:textSize="16sp"
 | 
					            android:textSize="16sp"
 | 
				
			||||||
            android:textStyle="bold"
 | 
					            android:textStyle="bold"
 | 
				
			||||||
            android:background="@drawable/button_active_background"
 | 
					            android:background="@drawable/button_finish_background"
 | 
				
			||||||
            android:fontFamily="@font/inter"
 | 
					            android:fontFamily="@font/inter"
 | 
				
			||||||
            app:layout_constraintTop_toBottomOf="@id/receipt_card"
 | 
					            app:layout_constraintTop_toBottomOf="@id/action_buttons_container"
 | 
				
			||||||
            app:layout_constraintBottom_toBottomOf="parent"
 | 
					            app:layout_constraintBottom_toBottomOf="parent"
 | 
				
			||||||
            app:layout_constraintVertical_bias="0"/>
 | 
					            app:layout_constraintVertical_bias="0"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user