implement login API dan BantuanActivity Riwayaat API
This commit is contained in:
parent
44225f1d67
commit
4209b193d7
@ -67,6 +67,10 @@
|
|||||||
android:name=".SettlementActivity"
|
android:name=".SettlementActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".LoginActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".histori.HistoryActivity"
|
android:name=".histori.HistoryActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
300
app/src/main/java/com/example/bdkipoc/LoginActivity.java
Normal file
300
app/src/main/java/com/example/bdkipoc/LoginActivity.java
Normal file
@ -0,0 +1,300 @@
|
|||||||
|
package com.example.bdkipoc;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.google.android.material.button.MaterialButton;
|
||||||
|
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.net.HttpURLConnection;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
import java.util.concurrent.Executors;
|
||||||
|
|
||||||
|
public class LoginActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
private static final String TAG = "LoginActivity";
|
||||||
|
private static final String API_URL = "https://be-edc.msvc.app/users/auth";
|
||||||
|
private static final String PREFS_NAME = "LoginPrefs";
|
||||||
|
private static final String KEY_TOKEN = "token";
|
||||||
|
private static final String KEY_USER_DATA = "user_data";
|
||||||
|
private static final String KEY_IS_LOGGED_IN = "is_logged_in";
|
||||||
|
|
||||||
|
private EditText etIdentifier, etPassword;
|
||||||
|
private MaterialButton btnLogin;
|
||||||
|
private ProgressBar progressBar;
|
||||||
|
private ExecutorService executor;
|
||||||
|
|
||||||
|
@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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
// Enable hardware acceleration
|
||||||
|
getWindow().setFlags(
|
||||||
|
WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
|
||||||
|
WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED
|
||||||
|
);
|
||||||
|
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_login);
|
||||||
|
|
||||||
|
// Check if user is already logged in
|
||||||
|
if (isUserLoggedIn()) {
|
||||||
|
navigateToMainActivity();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
initializeViews();
|
||||||
|
setupListeners();
|
||||||
|
|
||||||
|
executor = Executors.newSingleThreadExecutor();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initializeViews() {
|
||||||
|
etIdentifier = findViewById(R.id.et_identifier);
|
||||||
|
etPassword = findViewById(R.id.et_password);
|
||||||
|
btnLogin = findViewById(R.id.btn_login);
|
||||||
|
progressBar = findViewById(R.id.progress_bar);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupListeners() {
|
||||||
|
btnLogin.setOnClickListener(v -> {
|
||||||
|
String identifier = etIdentifier.getText().toString().trim();
|
||||||
|
String password = etPassword.getText().toString().trim();
|
||||||
|
|
||||||
|
if (validateInput(identifier, password)) {
|
||||||
|
performLogin(identifier, password);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean validateInput(String identifier, String password) {
|
||||||
|
if (TextUtils.isEmpty(identifier)) {
|
||||||
|
etIdentifier.setError("Email/Username tidak boleh kosong");
|
||||||
|
etIdentifier.requestFocus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TextUtils.isEmpty(password)) {
|
||||||
|
etPassword.setError("Password tidak boleh kosong");
|
||||||
|
etPassword.requestFocus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (password.length() < 6) {
|
||||||
|
etPassword.setError("Password minimal 6 karakter");
|
||||||
|
etPassword.requestFocus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void performLogin(String identifier, String password) {
|
||||||
|
setLoadingState(true);
|
||||||
|
|
||||||
|
executor.execute(() -> {
|
||||||
|
try {
|
||||||
|
// Create JSON payload
|
||||||
|
JSONObject jsonPayload = new JSONObject();
|
||||||
|
jsonPayload.put("identifier", identifier);
|
||||||
|
jsonPayload.put("password", password);
|
||||||
|
|
||||||
|
// Setup HTTP connection
|
||||||
|
URL url = new URL(API_URL);
|
||||||
|
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||||
|
connection.setRequestMethod("POST");
|
||||||
|
connection.setRequestProperty("Content-Type", "application/json");
|
||||||
|
connection.setRequestProperty("accept", "*/*");
|
||||||
|
connection.setDoOutput(true);
|
||||||
|
connection.setConnectTimeout(10000);
|
||||||
|
connection.setReadTimeout(10000);
|
||||||
|
|
||||||
|
// Send request
|
||||||
|
try (OutputStream os = connection.getOutputStream()) {
|
||||||
|
byte[] input = jsonPayload.toString().getBytes("utf-8");
|
||||||
|
os.write(input, 0, input.length);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get response
|
||||||
|
int responseCode = connection.getResponseCode();
|
||||||
|
Log.d(TAG, "Response Code: " + responseCode);
|
||||||
|
|
||||||
|
BufferedReader reader;
|
||||||
|
if (responseCode >= 200 && responseCode < 300) {
|
||||||
|
reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
|
||||||
|
} else {
|
||||||
|
reader = new BufferedReader(new InputStreamReader(connection.getErrorStream()));
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuilder response = new StringBuilder();
|
||||||
|
String line;
|
||||||
|
while ((line = reader.readLine()) != null) {
|
||||||
|
response.append(line);
|
||||||
|
}
|
||||||
|
reader.close();
|
||||||
|
connection.disconnect();
|
||||||
|
|
||||||
|
Log.d(TAG, "Response: " + response.toString());
|
||||||
|
|
||||||
|
// Parse response on main thread
|
||||||
|
runOnUiThread(() -> handleLoginResponse(responseCode, response.toString()));
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e(TAG, "Login error: " + e.getMessage(), e);
|
||||||
|
runOnUiThread(() -> {
|
||||||
|
setLoadingState(false);
|
||||||
|
Toast.makeText(this, "Koneksi gagal: " + e.getMessage(), Toast.LENGTH_LONG).show();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleLoginResponse(int responseCode, String responseBody) {
|
||||||
|
setLoadingState(false);
|
||||||
|
|
||||||
|
try {
|
||||||
|
JSONObject jsonResponse = new JSONObject(responseBody);
|
||||||
|
|
||||||
|
if (responseCode >= 200 && responseCode < 300) {
|
||||||
|
// Login successful
|
||||||
|
String message = jsonResponse.optString("message", "");
|
||||||
|
int status = jsonResponse.optInt("status", 0);
|
||||||
|
|
||||||
|
if (status == 200) {
|
||||||
|
JSONObject result = jsonResponse.getJSONObject("result");
|
||||||
|
String token = result.getString("token");
|
||||||
|
JSONObject userData = result.getJSONObject("user");
|
||||||
|
|
||||||
|
// Save login data
|
||||||
|
saveLoginData(token, userData.toString());
|
||||||
|
|
||||||
|
Toast.makeText(this, "Login berhasil! " + message, Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
|
// Navigate to MainActivity
|
||||||
|
navigateToMainActivity();
|
||||||
|
} else {
|
||||||
|
Toast.makeText(this, "Login gagal: " + message, Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Login failed
|
||||||
|
String errorMessage = jsonResponse.optString("message", "Login gagal");
|
||||||
|
Toast.makeText(this, errorMessage, Toast.LENGTH_LONG).show();
|
||||||
|
Log.e(TAG, "Login failed: " + errorMessage);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e(TAG, "Error parsing response: " + e.getMessage(), e);
|
||||||
|
Toast.makeText(this, "Error parsing response", Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setLoadingState(boolean isLoading) {
|
||||||
|
btnLogin.setEnabled(!isLoading);
|
||||||
|
etIdentifier.setEnabled(!isLoading);
|
||||||
|
etPassword.setEnabled(!isLoading);
|
||||||
|
progressBar.setVisibility(isLoading ? View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
|
if (isLoading) {
|
||||||
|
btnLogin.setText("Memproses...");
|
||||||
|
} else {
|
||||||
|
btnLogin.setText("MASUK");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void saveLoginData(String token, String userData) {
|
||||||
|
SharedPreferences prefs = getSharedPreferences(PREFS_NAME, MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor editor = prefs.edit();
|
||||||
|
editor.putString(KEY_TOKEN, token);
|
||||||
|
editor.putString(KEY_USER_DATA, userData);
|
||||||
|
editor.putBoolean(KEY_IS_LOGGED_IN, true);
|
||||||
|
editor.apply();
|
||||||
|
|
||||||
|
Log.d(TAG, "Login data saved successfully");
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isUserLoggedIn() {
|
||||||
|
SharedPreferences prefs = getSharedPreferences(PREFS_NAME, MODE_PRIVATE);
|
||||||
|
return prefs.getBoolean(KEY_IS_LOGGED_IN, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void navigateToMainActivity() {
|
||||||
|
Intent intent = new Intent(LoginActivity.this, MainActivity.class);
|
||||||
|
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Public static methods untuk mengakses data login dari activity lain
|
||||||
|
public static String getToken(android.content.Context context) {
|
||||||
|
SharedPreferences prefs = context.getSharedPreferences(PREFS_NAME, MODE_PRIVATE);
|
||||||
|
return prefs.getString(KEY_TOKEN, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getUserData(android.content.Context context) {
|
||||||
|
SharedPreferences prefs = context.getSharedPreferences(PREFS_NAME, MODE_PRIVATE);
|
||||||
|
return prefs.getString(KEY_USER_DATA, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static JSONObject getUserDataAsJson(android.content.Context context) {
|
||||||
|
try {
|
||||||
|
String userData = getUserData(context);
|
||||||
|
if (!TextUtils.isEmpty(userData)) {
|
||||||
|
return new JSONObject(userData);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e("LoginActivity", "Error parsing user data: " + e.getMessage());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void logout(android.content.Context context) {
|
||||||
|
SharedPreferences prefs = context.getSharedPreferences(PREFS_NAME, MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor editor = prefs.edit();
|
||||||
|
editor.clear();
|
||||||
|
editor.apply();
|
||||||
|
|
||||||
|
// Navigate back to login
|
||||||
|
Intent intent = new Intent(context, LoginActivity.class);
|
||||||
|
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||||
|
context.startActivity(intent);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isLoggedIn(android.content.Context context) {
|
||||||
|
SharedPreferences prefs = context.getSharedPreferences(PREFS_NAME, MODE_PRIVATE);
|
||||||
|
return prefs.getBoolean(KEY_IS_LOGGED_IN, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
if (executor != null && !executor.isShutdown()) {
|
||||||
|
executor.shutdown();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -8,6 +8,9 @@ import android.widget.TextView;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
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.MenuItem;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import androidx.activity.EdgeToEdge;
|
import androidx.activity.EdgeToEdge;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
@ -30,10 +33,18 @@ import com.example.bdkipoc.transaction.ResultTransactionActivity;
|
|||||||
|
|
||||||
import com.example.bdkipoc.bantuan.BantuanActivity;
|
import com.example.bdkipoc.bantuan.BantuanActivity;
|
||||||
|
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
private static final String TAG = "MainActivity";
|
||||||
private boolean isExpanded = false; // False = showing only 9 main menus, True = showing all 15 menus
|
private boolean isExpanded = false; // False = showing only 9 main menus, True = showing all 15 menus
|
||||||
private MaterialButton btnLainnya;
|
private MaterialButton btnLainnya;
|
||||||
|
private MaterialButton logoutButton;
|
||||||
|
private TextView tvUserName, tvUserRole;
|
||||||
|
private LinearLayout userInfoSection;
|
||||||
|
private String authToken;
|
||||||
|
private JSONObject userData;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onWindowFocusChanged(boolean hasFocus) {
|
public void onWindowFocusChanged(boolean hasFocus) {
|
||||||
@ -58,6 +69,17 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
);
|
);
|
||||||
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
// Check if user is logged in
|
||||||
|
if (!LoginActivity.isLoggedIn(this)) {
|
||||||
|
// User is not logged in, redirect to login
|
||||||
|
Intent intent = new Intent(this, LoginActivity.class);
|
||||||
|
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
EdgeToEdge.enable(this);
|
EdgeToEdge.enable(this);
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
|
|
||||||
@ -67,8 +89,20 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Load user data
|
||||||
|
loadUserData();
|
||||||
|
|
||||||
// Initialize views
|
// Initialize views
|
||||||
btnLainnya = findViewById(R.id.btn_lainnya);
|
btnLainnya = findViewById(R.id.btn_lainnya);
|
||||||
|
logoutButton = findViewById(R.id.logout_button);
|
||||||
|
tvUserName = findViewById(R.id.tv_user_name);
|
||||||
|
tvUserRole = findViewById(R.id.tv_user_role);
|
||||||
|
userInfoSection = findViewById(R.id.user_info_section);
|
||||||
|
|
||||||
|
// Setup logout button
|
||||||
|
if (logoutButton != null) {
|
||||||
|
logoutButton.setOnClickListener(v -> performLogout());
|
||||||
|
}
|
||||||
|
|
||||||
// Check if we're returning from a completed transaction
|
// Check if we're returning from a completed transaction
|
||||||
checkTransactionCompletion();
|
checkTransactionCompletion();
|
||||||
@ -78,6 +112,112 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
// Setup menu listeners
|
// Setup menu listeners
|
||||||
setupMenuListeners();
|
setupMenuListeners();
|
||||||
|
|
||||||
|
// Display user info
|
||||||
|
displayUserInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadUserData() {
|
||||||
|
// Get authentication token
|
||||||
|
authToken = LoginActivity.getToken(this);
|
||||||
|
|
||||||
|
// Get user data
|
||||||
|
userData = LoginActivity.getUserDataAsJson(this);
|
||||||
|
|
||||||
|
Log.d(TAG, "Loaded auth token: " + (authToken != null ? "✓" : "✗"));
|
||||||
|
Log.d(TAG, "Loaded user data: " + (userData != null ? "✓" : "✗"));
|
||||||
|
|
||||||
|
if (userData != null) {
|
||||||
|
Log.d(TAG, "User: " + userData.optString("name", "Unknown"));
|
||||||
|
Log.d(TAG, "Email: " + userData.optString("email", "Unknown"));
|
||||||
|
Log.d(TAG, "Role: " + userData.optString("role", "Unknown"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void displayUserInfo() {
|
||||||
|
if (userData != null) {
|
||||||
|
String userName = userData.optString("name", "User");
|
||||||
|
String userRole = userData.optString("role", "");
|
||||||
|
|
||||||
|
// Display welcome message
|
||||||
|
String welcomeMessage = "Selamat datang, " + userName;
|
||||||
|
if (!userRole.isEmpty()) {
|
||||||
|
welcomeMessage += " (" + userRole + ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show welcome toast
|
||||||
|
Toast.makeText(this, welcomeMessage, Toast.LENGTH_LONG).show();
|
||||||
|
|
||||||
|
// Update merchant card with user info
|
||||||
|
if (tvUserName != null) {
|
||||||
|
tvUserName.setText(userName);
|
||||||
|
}
|
||||||
|
if (tvUserRole != null && !userRole.isEmpty()) {
|
||||||
|
tvUserRole.setText("(" + userRole + ")");
|
||||||
|
tvUserRole.setVisibility(View.VISIBLE);
|
||||||
|
} else if (tvUserRole != null) {
|
||||||
|
tvUserRole.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show user info section in merchant card
|
||||||
|
if (userInfoSection != null) {
|
||||||
|
userInfoSection.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Method to get auth token for use in other activities
|
||||||
|
public static String getAuthToken(android.content.Context context) {
|
||||||
|
return LoginActivity.getToken(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Method to get user data for use in other activities
|
||||||
|
public static JSONObject getUserData(android.content.Context context) {
|
||||||
|
return LoginActivity.getUserDataAsJson(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
|
// Menu logout sudah ada di custom toolbar, tidak perlu action bar menu
|
||||||
|
return false; // Return false to not show action bar menu
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
// No longer needed since logout is handled by custom toolbar button
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void performLogout() {
|
||||||
|
// Show confirmation dialog with red theme
|
||||||
|
androidx.appcompat.app.AlertDialog.Builder builder = new androidx.appcompat.app.AlertDialog.Builder(this);
|
||||||
|
builder.setTitle("Logout");
|
||||||
|
builder.setMessage("Apakah Anda yakin ingin keluar dari aplikasi?");
|
||||||
|
builder.setIcon(android.R.drawable.ic_dialog_alert);
|
||||||
|
|
||||||
|
// Set positive button (Ya)
|
||||||
|
builder.setPositiveButton("Ya", (dialog, which) -> {
|
||||||
|
// Show logout progress
|
||||||
|
Toast.makeText(this, "Logging out...", Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
|
// Perform logout
|
||||||
|
LoginActivity.logout(this);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Set negative button (Batal)
|
||||||
|
builder.setNegativeButton("Batal", (dialog, which) -> {
|
||||||
|
dialog.dismiss();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Create and show dialog
|
||||||
|
androidx.appcompat.app.AlertDialog dialog = builder.create();
|
||||||
|
dialog.show();
|
||||||
|
|
||||||
|
// Customize button colors
|
||||||
|
dialog.getButton(androidx.appcompat.app.AlertDialog.BUTTON_POSITIVE)
|
||||||
|
.setTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
dialog.getButton(androidx.appcompat.app.AlertDialog.BUTTON_NEGATIVE)
|
||||||
|
.setTextColor(getResources().getColor(android.R.color.black));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupInitialMenuState() {
|
private void setupInitialMenuState() {
|
||||||
@ -161,30 +301,30 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
CardView cardView = findViewById(cardId);
|
CardView cardView = findViewById(cardId);
|
||||||
if (cardView != null) {
|
if (cardView != null) {
|
||||||
cardView.setOnClickListener(v -> {
|
cardView.setOnClickListener(v -> {
|
||||||
// ✅ ENHANCED: Navigate with payment type information
|
// ✅ ENHANCED: Navigate with payment type information and auth token
|
||||||
if (cardId == R.id.card_kartu_kredit) {
|
if (cardId == R.id.card_kartu_kredit) {
|
||||||
navigateToCreateTransaction("credit_card", cardId, "Kartu Kredit");
|
navigateToCreateTransaction("credit_card", cardId, "Kartu Kredit");
|
||||||
} else if (cardId == R.id.card_kartu_debit) {
|
} else if (cardId == R.id.card_kartu_debit) {
|
||||||
navigateToCreateTransaction("debit_card", cardId, "Kartu Debit");
|
navigateToCreateTransaction("debit_card", cardId, "Kartu Debit");
|
||||||
} else if (cardId == R.id.card_qris) {
|
} else if (cardId == R.id.card_qris) {
|
||||||
startActivity(new Intent(MainActivity.this, QrisActivity.class));
|
startActivityWithAuth(new Intent(MainActivity.this, QrisActivity.class));
|
||||||
// Col-2
|
// Col-2
|
||||||
} else if (cardId == R.id.card_transfer) {
|
} else if (cardId == R.id.card_transfer) {
|
||||||
navigateToCreateTransaction("transfer", cardId, "Transfer");
|
navigateToCreateTransaction("transfer", cardId, "Transfer");
|
||||||
} else if (cardId == R.id.card_uang_elektronik) {
|
} else if (cardId == R.id.card_uang_elektronik) {
|
||||||
navigateToCreateTransaction("e_money", cardId, "Uang Elektronik");
|
navigateToCreateTransaction("e_money", cardId, "Uang Elektronik");
|
||||||
} else if (cardId == R.id.card_cetak_ulang) {
|
} else if (cardId == R.id.card_cetak_ulang) {
|
||||||
startActivity(new Intent(MainActivity.this, ReprintActivity.class));
|
startActivityWithAuth(new Intent(MainActivity.this, ReprintActivity.class));
|
||||||
// Col-3
|
// Col-3
|
||||||
} else if (cardId == R.id.card_refund) {
|
} else if (cardId == R.id.card_refund) {
|
||||||
navigateToCreateTransaction("refund", cardId, "Refund");
|
navigateToCreateTransaction("refund", cardId, "Refund");
|
||||||
} else if (cardId == R.id.card_settlement) {
|
} else if (cardId == R.id.card_settlement) {
|
||||||
Toast.makeText(this, "Settlement - Coming Soon", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "Settlement - Coming Soon", Toast.LENGTH_SHORT).show();
|
||||||
} else if (cardId == R.id.card_histori) {
|
} else if (cardId == R.id.card_histori) {
|
||||||
startActivity(new Intent(MainActivity.this, HistoryActivity.class));
|
startActivityWithAuth(new Intent(MainActivity.this, HistoryActivity.class));
|
||||||
// Col-4
|
// Col-4
|
||||||
} else if (cardId == R.id.card_bantuan) {
|
} else if (cardId == R.id.card_bantuan) {
|
||||||
startActivity(new Intent(MainActivity.this, BantuanActivity.class));
|
startActivityWithAuth(new Intent(MainActivity.this, BantuanActivity.class));
|
||||||
} else if (cardId == R.id.card_info_toko) {
|
} else if (cardId == R.id.card_info_toko) {
|
||||||
Toast.makeText(this, "Info Toko - Coming Soon", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "Info Toko - Coming Soon", Toast.LENGTH_SHORT).show();
|
||||||
} else if (cardId == R.id.card_pengaturan) {
|
} else if (cardId == R.id.card_pengaturan) {
|
||||||
@ -243,12 +383,12 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
if (scanBayarContent != null) {
|
if (scanBayarContent != null) {
|
||||||
scanBayarContent.setOnClickListener(v -> {
|
scanBayarContent.setOnClickListener(v -> {
|
||||||
// Navigate to QRIS payment activity
|
// Navigate to QRIS payment activity
|
||||||
startActivity(new Intent(MainActivity.this, QrisActivity.class));
|
startActivityWithAuth(new Intent(MainActivity.this, QrisActivity.class));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ✅ NEW: Enhanced navigation method with payment type information
|
// ✅ NEW: Enhanced navigation method with payment type information and auth token
|
||||||
private void navigateToCreateTransaction(String paymentType, int cardMenuId, String cardName) {
|
private void navigateToCreateTransaction(String paymentType, int cardMenuId, String cardName) {
|
||||||
try {
|
try {
|
||||||
Intent intent = new Intent(MainActivity.this, CreateTransactionActivity.class);
|
Intent intent = new Intent(MainActivity.this, CreateTransactionActivity.class);
|
||||||
@ -259,21 +399,45 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
intent.putExtra("CARD_NAME", cardName);
|
intent.putExtra("CARD_NAME", cardName);
|
||||||
intent.putExtra("CALLING_ACTIVITY", "MainActivity");
|
intent.putExtra("CALLING_ACTIVITY", "MainActivity");
|
||||||
|
|
||||||
|
// ✅ NEW: Pass authentication data
|
||||||
|
intent.putExtra("AUTH_TOKEN", authToken);
|
||||||
|
if (userData != null) {
|
||||||
|
intent.putExtra("USER_DATA", userData.toString());
|
||||||
|
}
|
||||||
|
|
||||||
// ✅ DEBUG: Log navigation details
|
// ✅ DEBUG: Log navigation details
|
||||||
android.util.Log.d("MainActivity", "=== NAVIGATING TO CREATE TRANSACTION ===");
|
Log.d(TAG, "=== NAVIGATING TO CREATE TRANSACTION ===");
|
||||||
android.util.Log.d("MainActivity", "Payment Type: " + paymentType);
|
Log.d(TAG, "Payment Type: " + paymentType);
|
||||||
android.util.Log.d("MainActivity", "Card Menu ID: " + cardMenuId);
|
Log.d(TAG, "Card Menu ID: " + cardMenuId);
|
||||||
android.util.Log.d("MainActivity", "Card Name: " + cardName);
|
Log.d(TAG, "Card Name: " + cardName);
|
||||||
android.util.Log.d("MainActivity", "========================================");
|
Log.d(TAG, "Auth Token: " + (authToken != null ? "✓" : "✗"));
|
||||||
|
Log.d(TAG, "========================================");
|
||||||
|
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
android.util.Log.e("MainActivity", "Error navigating to CreateTransaction: " + e.getMessage(), e);
|
Log.e(TAG, "Error navigating to CreateTransaction: " + e.getMessage(), e);
|
||||||
Toast.makeText(this, "Error opening transaction: " + e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "Error opening transaction: " + e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ✅ NEW: Helper method to start activity with authentication data
|
||||||
|
private void startActivityWithAuth(Intent intent) {
|
||||||
|
try {
|
||||||
|
// Add authentication data to intent
|
||||||
|
intent.putExtra("AUTH_TOKEN", authToken);
|
||||||
|
if (userData != null) {
|
||||||
|
intent.putExtra("USER_DATA", userData.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
startActivity(intent);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e(TAG, "Error starting activity: " + e.getMessage(), e);
|
||||||
|
Toast.makeText(this, "Error opening activity: " + e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ✅ NEW: Helper method to get payment type from card ID (for backward compatibility)
|
// ✅ NEW: Helper method to get payment type from card ID (for backward compatibility)
|
||||||
private String getPaymentTypeFromCardId(int cardId) {
|
private String getPaymentTypeFromCardId(int cardId) {
|
||||||
if (cardId == R.id.card_kartu_kredit) {
|
if (cardId == R.id.card_kartu_kredit) {
|
||||||
@ -289,7 +453,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
} else if (cardId == R.id.card_refund) {
|
} else if (cardId == R.id.card_refund) {
|
||||||
return "refund";
|
return "refund";
|
||||||
} else {
|
} else {
|
||||||
android.util.Log.w("MainActivity", "Unknown card ID: " + cardId + ", defaulting to credit_card");
|
Log.w(TAG, "Unknown card ID: " + cardId + ", defaulting to credit_card");
|
||||||
return "credit_card";
|
return "credit_card";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -378,24 +542,35 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
|
// Check if user is still logged in
|
||||||
|
if (!LoginActivity.isLoggedIn(this)) {
|
||||||
|
// User is not logged in, redirect to login
|
||||||
|
Intent intent = new Intent(this, LoginActivity.class);
|
||||||
|
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Clear any transaction completion flags to avoid repeated messages
|
// Clear any transaction completion flags to avoid repeated messages
|
||||||
getIntent().removeExtra("transaction_completed");
|
getIntent().removeExtra("transaction_completed");
|
||||||
getIntent().removeExtra("transaction_amount");
|
getIntent().removeExtra("transaction_amount");
|
||||||
|
|
||||||
// ✅ NEW: Log resume for debugging
|
// ✅ NEW: Log resume for debugging
|
||||||
android.util.Log.d("MainActivity", "MainActivity resumed");
|
Log.d(TAG, "MainActivity resumed");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
android.util.Log.d("MainActivity", "MainActivity paused");
|
Log.d(TAG, "MainActivity paused");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
android.util.Log.d("MainActivity", "MainActivity destroyed");
|
Log.d(TAG, "MainActivity destroyed");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ✅ NEW: Method to handle direct payment type launch (for external calls)
|
// ✅ NEW: Method to handle direct payment type launch (for external calls)
|
||||||
@ -404,6 +579,14 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
intent.putExtra("PAYMENT_TYPE", paymentType);
|
intent.putExtra("PAYMENT_TYPE", paymentType);
|
||||||
intent.putExtra("CARD_NAME", cardName);
|
intent.putExtra("CARD_NAME", cardName);
|
||||||
intent.putExtra("CALLING_ACTIVITY", "External");
|
intent.putExtra("CALLING_ACTIVITY", "External");
|
||||||
|
|
||||||
|
// Add authentication data
|
||||||
|
intent.putExtra("AUTH_TOKEN", LoginActivity.getToken(context));
|
||||||
|
String userData = LoginActivity.getUserData(context);
|
||||||
|
if (!userData.isEmpty()) {
|
||||||
|
intent.putExtra("USER_DATA", userData);
|
||||||
|
}
|
||||||
|
|
||||||
return intent;
|
return intent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -413,7 +596,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
if (cardView != null) {
|
if (cardView != null) {
|
||||||
cardView.performClick();
|
cardView.performClick();
|
||||||
} else {
|
} else {
|
||||||
android.util.Log.w("MainActivity", "Card not found for ID: " + cardId);
|
Log.w(TAG, "Card not found for ID: " + cardId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -435,7 +618,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
// ✅ NEW: Debug method to log all card IDs and their payment types
|
// ✅ NEW: Debug method to log all card IDs and their payment types
|
||||||
private void debugCardMappings() {
|
private void debugCardMappings() {
|
||||||
android.util.Log.d("MainActivity", "=== CARD PAYMENT TYPE MAPPINGS ===");
|
Log.d(TAG, "=== CARD PAYMENT TYPE MAPPINGS ===");
|
||||||
|
|
||||||
int[] cardIds = {
|
int[] cardIds = {
|
||||||
R.id.card_kartu_kredit, R.id.card_kartu_debit, R.id.card_qris,
|
R.id.card_kartu_kredit, R.id.card_kartu_debit, R.id.card_qris,
|
||||||
@ -445,10 +628,10 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
for (int cardId : cardIds) {
|
for (int cardId : cardIds) {
|
||||||
String paymentType = getPaymentTypeFromCardId(cardId);
|
String paymentType = getPaymentTypeFromCardId(cardId);
|
||||||
String cardName = getCardNameFromCardId(cardId);
|
String cardName = getCardNameFromCardId(cardId);
|
||||||
android.util.Log.d("MainActivity",
|
Log.d(TAG,
|
||||||
"Card ID: " + cardId + " -> Payment Type: " + paymentType + " -> Name: " + cardName);
|
"Card ID: " + cardId + " -> Payment Type: " + paymentType + " -> Name: " + cardName);
|
||||||
}
|
}
|
||||||
|
|
||||||
android.util.Log.d("MainActivity", "==================================");
|
Log.d(TAG, "==================================");
|
||||||
}
|
}
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
@ -1,488 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:background="#FFFFFF">
|
|
||||||
|
|
||||||
<!-- Custom AppBar -->
|
|
||||||
<include layout="@layout/component_appbar" />
|
|
||||||
|
|
||||||
<!-- Main Card Container -->
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="480dp"
|
|
||||||
android:layout_marginTop="-80dp"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
app:cardCornerRadius="12dp"
|
|
||||||
app:cardElevation="4dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:background="@android:color/white">
|
|
||||||
|
|
||||||
<!-- Logo Section with Tabs -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="16dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="94.149dp"
|
|
||||||
android:layout_height="38.248dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginLeft="10.9dp"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:src="@drawable/ic_logo_icon"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:scaleType="fitCenter"
|
|
||||||
android:contentDescription="Payvora PRO Logo"/>
|
|
||||||
|
|
||||||
<!-- Tabs -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:paddingHorizontal="16dp"
|
|
||||||
android:gravity="center_horizontal">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/tab_umum"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:background="@drawable/tab_inactive_bg"
|
|
||||||
android:layout_marginEnd="8dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/text_umum"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Umum"
|
|
||||||
android:textColor="#DE0701"
|
|
||||||
android:textSize="16sp"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/tab_riwayat"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/tab_active_bg"
|
|
||||||
android:gravity="center"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:layout_marginStart="8dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/text_riwayat"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Riwayat"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textSize="16sp"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="#e0e0e0"/>
|
|
||||||
|
|
||||||
<!-- Content -->
|
|
||||||
<ScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:paddingBottom="16dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<!-- History Item 1 -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:background="@android:color/white">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="07-05-2025"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Pengajuan"
|
|
||||||
android:textColor="@android:color/holo_blue_light"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Nomor tiket: 0705250819"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="@android:color/darker_gray"
|
|
||||||
android:layout_marginTop="4dp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Transaksi gagal tapi saldo terpotong"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginTop="8dp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="#e0e0e0"/>
|
|
||||||
|
|
||||||
<!-- History Item 2 -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:background="@android:color/white">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="07-05-2025"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Proses"
|
|
||||||
android:textColor="@android:color/holo_orange_light"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Nomor tiket: 0705250819"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="@android:color/darker_gray"
|
|
||||||
android:layout_marginTop="4dp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Transaksi gagal tapi saldo terpotong"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginTop="8dp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="#e0e0e0"/>
|
|
||||||
|
|
||||||
<!-- History Item 3 -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:background="@android:color/white">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="07-05-2025"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Selesai"
|
|
||||||
android:textColor="@android:color/holo_green_dark"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Nomor tiket: 0705250819"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="@android:color/darker_gray"
|
|
||||||
android:layout_marginTop="4dp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Transaksi gagal tapi saldo terpotong"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginTop="8dp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="#e0e0e0"/>
|
|
||||||
|
|
||||||
<!-- History Item 4 -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:background="@android:color/white">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="07-05-2025"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Cancel"
|
|
||||||
android:textColor="@android:color/holo_red_dark"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Nomor tiket: 0705250819"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="@android:color/darker_gray"
|
|
||||||
android:layout_marginTop="4dp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Transaksi gagal tapi saldo terpotong"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginTop="8dp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="#e0e0e0"/>
|
|
||||||
|
|
||||||
<!-- Additional History Items to match image 3 content -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:background="@android:color/white">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="06-05-2025"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Selesai"
|
|
||||||
android:textColor="@android:color/holo_green_dark"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Nomor tiket: 0605250642"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="@android:color/darker_gray"
|
|
||||||
android:layout_marginTop="4dp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="EDC tidak merespon / hang"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginTop="8dp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="#e0e0e0"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:background="@android:color/white">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="05-05-2025"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Proses"
|
|
||||||
android:textColor="@android:color/holo_orange_light"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Nomor tiket: 0505250531"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="@android:color/darker_gray"
|
|
||||||
android:layout_marginTop="4dp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Gagal cetak struk"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:layout_marginTop="8dp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
|
|
||||||
<!-- Bottom Buttons -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:paddingHorizontal="16dp"
|
|
||||||
android:paddingVertical="16dp"
|
|
||||||
android:background="@android:color/white"
|
|
||||||
android:gravity="center">
|
|
||||||
|
|
||||||
<!-- Tombol Isi Form -->
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/btn_form"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:gravity="center"
|
|
||||||
android:background="@drawable/border_button_red">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Isi Form Bantuan"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="#DE0701"
|
|
||||||
android:fontFamily="sans-serif-medium" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Tombol WhatsApp -->
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/btn_whatsapp"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:gravity="center"
|
|
||||||
android:background="@drawable/border_button_red"
|
|
||||||
android:paddingHorizontal="8dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="20dp"
|
|
||||||
android:layout_height="20dp"
|
|
||||||
android:src="@drawable/ic_whatsapp"
|
|
||||||
android:contentDescription="WhatsApp Icon"
|
|
||||||
android:layout_marginEnd="8dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="WhatsApp CS"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="#DE0701"
|
|
||||||
android:fontFamily="sans-serif-medium" />
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
@ -1,498 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:background="#FFFFFF">
|
|
||||||
|
|
||||||
<!-- Custom AppBar -->
|
|
||||||
<include layout="@layout/component_appbar" />
|
|
||||||
|
|
||||||
<!-- Main Card Container -->
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="480dp"
|
|
||||||
android:layout_marginTop="-80dp"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
app:cardCornerRadius="12dp"
|
|
||||||
app:cardElevation="4dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:background="@android:color/white">
|
|
||||||
|
|
||||||
<!-- Logo Section with Tabs -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="16dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="94.149dp"
|
|
||||||
android:layout_height="38.248dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginLeft="10.9dp"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:src="@drawable/ic_logo_icon"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:scaleType="fitCenter"
|
|
||||||
android:contentDescription="Payvora PRO Logo"/>
|
|
||||||
|
|
||||||
<!-- Tabs -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:paddingHorizontal="16dp"
|
|
||||||
android:gravity="center_horizontal">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/tab_umum"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:background="@drawable/tab_active_bg"
|
|
||||||
android:layout_marginEnd="8dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/text_umum"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Umum"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textSize="16sp"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/tab_riwayat"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/tab_inactive_bg"
|
|
||||||
android:gravity="center"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:layout_marginStart="8dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/text_riwayat"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Riwayat"
|
|
||||||
android:textColor="#DE0701"
|
|
||||||
android:textSize="16sp"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="#e0e0e0"/>
|
|
||||||
|
|
||||||
<!-- Content -->
|
|
||||||
<ScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:paddingBottom="16dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<!-- Add new item at top like in image 3 -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:background="@android:color/white"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Transaksi gagal tapi saldo terpotong"
|
|
||||||
android:textSize="16sp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Lihat Solusi"
|
|
||||||
android:textColor="@android:color/holo_blue_light"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="#e0e0e0"/>
|
|
||||||
|
|
||||||
<!-- Help Items -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:background="@android:color/white"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="QRIS tidak terbaca"
|
|
||||||
android:textSize="16sp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Lihat Solusi"
|
|
||||||
android:textColor="@android:color/holo_blue_light"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="#e0e0e0"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:background="@android:color/white"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="EDC tidak merespon / hang"
|
|
||||||
android:textSize="16sp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Lihat Solusi"
|
|
||||||
android:textColor="@android:color/holo_blue_light"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="#e0e0e0"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:background="@android:color/white"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Gagal cetak struk"
|
|
||||||
android:textSize="16sp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Lihat Solusi"
|
|
||||||
android:textColor="@android:color/holo_blue_light"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="#e0e0e0"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:background="@android:color/white"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Cara Reset EDC"
|
|
||||||
android:textSize="16sp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Lihat Solusi"
|
|
||||||
android:textColor="@android:color/holo_blue_light"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="#e0e0e0"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:background="@android:color/white"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Cara Hubungkan ke WiFi"
|
|
||||||
android:textSize="16sp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Lihat Solusi"
|
|
||||||
android:textColor="@android:color/holo_blue_light"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="#e0e0e0"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:background="@android:color/white"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Cara pembayaran kartu (debit/kredit)"
|
|
||||||
android:textSize="16sp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Lihat Solusi"
|
|
||||||
android:textColor="@android:color/holo_blue_light"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="#e0e0e0"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:background="@android:color/white"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Cara Refund Transaksi QRIS"
|
|
||||||
android:textSize="16sp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Lihat Solusi"
|
|
||||||
android:textColor="@android:color/holo_blue_light"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="#e0e0e0"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:background="@android:color/white"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Cara melakukan Settlement"
|
|
||||||
android:textSize="16sp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Lihat Solusi"
|
|
||||||
android:textColor="@android:color/holo_blue_light"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="#e0e0e0"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:background="@android:color/white"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Cara membatalkan transaksi (void)"
|
|
||||||
android:textSize="16sp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Lihat Solusi"
|
|
||||||
android:textColor="@android:color/holo_blue_light"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="#e0e0e0"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:background="@android:color/white"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Cara melihat riwayat transaksi"
|
|
||||||
android:textSize="16sp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Lihat Solusi"
|
|
||||||
android:textColor="@android:color/holo_blue_light"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
|
|
||||||
<!-- Bottom Buttons - Outside Card -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:paddingHorizontal="16dp"
|
|
||||||
android:paddingVertical="16dp"
|
|
||||||
android:background="@android:color/white"
|
|
||||||
android:gravity="center">
|
|
||||||
|
|
||||||
<!-- Tombol Isi Form -->
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/btn_form"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:gravity="center"
|
|
||||||
android:background="@drawable/border_button_red">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Isi Form Bantuan"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="#DE0701"
|
|
||||||
android:fontFamily="sans-serif-medium" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Tombol WhatsApp -->
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/btn_whatsapp"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:gravity="center"
|
|
||||||
android:background="@drawable/border_button_red"
|
|
||||||
android:paddingHorizontal="8dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="20dp"
|
|
||||||
android:layout_height="20dp"
|
|
||||||
android:src="@drawable/ic_whatsapp"
|
|
||||||
android:contentDescription="WhatsApp Icon"
|
|
||||||
android:layout_marginEnd="8dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="WhatsApp CS"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="#DE0701"
|
|
||||||
android:fontFamily="sans-serif-medium" />
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
211
app/src/main/res/layout/activity_login.xml
Normal file
211
app/src/main/res/layout/activity_login.xml
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#DE0701"
|
||||||
|
tools:context=".LoginActivity">
|
||||||
|
|
||||||
|
<!-- Background dengan gradient -->
|
||||||
|
<View
|
||||||
|
android:id="@+id/background_gradient"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:background="#DE0701"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<!-- Main Content Container -->
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:id="@+id/login_card"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="24dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:elevation="8dp"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardElevation="8dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="32dp">
|
||||||
|
|
||||||
|
<!-- Logo/Title Section -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingBottom="32dp">
|
||||||
|
|
||||||
|
<!-- App Icon/Logo -->
|
||||||
|
<View
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:background="#DE0701"
|
||||||
|
android:elevation="4dp" />
|
||||||
|
|
||||||
|
<!-- Title -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:text="BDKI POC"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="28sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<!-- Subtitle -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Masuk ke akun Anda"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Login Form -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!-- Email/Username Input -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:hint="Email atau Username"
|
||||||
|
app:boxBackgroundMode="outline"
|
||||||
|
app:boxCornerRadiusBottomEnd="8dp"
|
||||||
|
app:boxCornerRadiusBottomStart="8dp"
|
||||||
|
app:boxCornerRadiusTopEnd="8dp"
|
||||||
|
app:boxCornerRadiusTopStart="8dp"
|
||||||
|
app:boxStrokeColor="#DE0701"
|
||||||
|
app:hintTextColor="#DE0701"
|
||||||
|
app:startIconDrawable="@android:drawable/ic_dialog_email">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/et_identifier"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textEmailAddress"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<!-- Password Input -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="24dp"
|
||||||
|
android:hint="Password"
|
||||||
|
app:boxBackgroundMode="outline"
|
||||||
|
app:boxCornerRadiusBottomEnd="8dp"
|
||||||
|
app:boxCornerRadiusBottomStart="8dp"
|
||||||
|
app:boxCornerRadiusTopEnd="8dp"
|
||||||
|
app:boxCornerRadiusTopStart="8dp"
|
||||||
|
app:boxStrokeColor="@android:color/holo_blue_bright"
|
||||||
|
app:endIconMode="password_toggle"
|
||||||
|
app:hintTextColor="@android:color/holo_blue_bright"
|
||||||
|
app:startIconDrawable="@android:drawable/ic_lock_idle_lock">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/et_password"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<!-- Login Button -->
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btn_login"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:backgroundTint="#DE0701"
|
||||||
|
android:text="MASUK"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:cornerRadius="8dp"
|
||||||
|
app:elevation="4dp" />
|
||||||
|
|
||||||
|
<!-- Progress Bar -->
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/progress_bar"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:indeterminateTint="#DE0701"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Footer Info -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:text="Demo Credentials:"
|
||||||
|
android:textColor="#999999"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="2dp"
|
||||||
|
android:text="Email: welno@gmail.com"
|
||||||
|
android:textColor="#999999"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Password: 55555555"
|
||||||
|
android:textColor="#999999"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
<!-- Status Bar Overlay -->
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -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="100dp"
|
android:layout_height="60dp"
|
||||||
android:background="#E31937"
|
android:background="#E31937"
|
||||||
app:layout_constraintTop_toBottomOf="@id/status_bar_background"/>
|
app:layout_constraintTop_toBottomOf="@id/status_bar_background"/>
|
||||||
|
|
||||||
@ -37,57 +37,152 @@
|
|||||||
android:id="@+id/merchant_card"
|
android:id="@+id/merchant_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_marginStart="16dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:translationY="-12dp"
|
||||||
app:cardCornerRadius="12dp"
|
app:cardCornerRadius="12dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="4dp"
|
||||||
app:layout_constraintTop_toBottomOf="@id/status_bar_background">
|
app:layout_constraintTop_toBottomOf="@id/status_bar_background">
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="16dp">
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<!-- Logout Button di pojok kanan atas -->
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/logout_button"
|
||||||
|
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Logout"
|
||||||
|
android:textColor="#DE0701"
|
||||||
|
android:textSize="11sp"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:backgroundTint="@android:color/transparent"
|
||||||
|
android:drawableLeft="@android:drawable/ic_lock_power_off"
|
||||||
|
android:drawableTint="#DE0701"
|
||||||
|
android:drawablePadding="4dp"
|
||||||
|
android:padding="6dp"
|
||||||
|
android:minWidth="0dp"
|
||||||
|
android:minHeight="0dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<!-- Logo Payvora PRO -->
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/logo_payvora"
|
||||||
android:layout_width="144dp"
|
android:layout_width="144dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="36dp"
|
||||||
android:src="@drawable/ic_logo_icon"
|
android:src="@drawable/ic_logo_icon"
|
||||||
android:scaleType="fitStart"
|
android:scaleType="fitStart"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:layout_marginBottom="8dp"/>
|
android:layout_marginBottom="8dp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/logout_button"
|
||||||
|
app:layout_constraintHorizontal_bias="0" />
|
||||||
|
|
||||||
|
<!-- Nama Toko -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/tv_store_name"
|
||||||
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="TOKO KLONTONG PAK EKO"
|
android:text="TOKO KLONTONG PAK EKO"
|
||||||
android:textColor="#061D28"
|
android:textColor="#061D28"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:layout_gravity="center_horizontal"/>
|
android:gravity="center"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/logo_payvora" />
|
||||||
|
|
||||||
|
<!-- Alamat Toko -->
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tv_store_address"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:text="Ciputat Baru, Tangsel"
|
android:text="Ciputat Baru, Tangsel"
|
||||||
android:textColor="#9FA4A9"
|
android:textColor="#9FA4A9"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:layout_gravity="center_horizontal"/>
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_store_name" />
|
||||||
|
|
||||||
|
<!-- User Info Section -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/user_info_section"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:background="#F8F9FA"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_store_address">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_user_welcome"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="👤 Welcome, "
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_user_name"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="User Name"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:ellipsize="end" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_user_role"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="(Role)"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="11sp"
|
||||||
|
android:layout_marginStart="4dp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Divider -->
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/divider"
|
||||||
|
android:layout_width="0dp"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:layout_marginBottom="12dp"
|
android:layout_marginBottom="12dp"
|
||||||
android:background="#EEEEEE"/>
|
android:background="#EEEEEE"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/user_info_section" />
|
||||||
|
|
||||||
|
<!-- MID and TID Info -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/mid_tid_section"
|
||||||
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:gravity="center">
|
android:gravity="center"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/divider">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tv_mid"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="MID: 12345678901"
|
android:text="MID: 12345678901"
|
||||||
@ -96,13 +191,17 @@
|
|||||||
android:layout_marginEnd="16dp" />
|
android:layout_marginEnd="16dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tv_tid"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="TID: 12345678901"
|
android:text="TID: 12345678901"
|
||||||
android:textColor="#9FA4A9"
|
android:textColor="#9FA4A9"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<!-- Menu Grid -->
|
<!-- Menu Grid -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user