Implement API Info Toko
This commit is contained in:
parent
c033a26516
commit
c18fd2d831
@ -87,6 +87,10 @@
|
||||
android:name=".transaction.ResultTransactionActivity"
|
||||
android:exported="false" />
|
||||
|
||||
<activity
|
||||
android:name=".settlement.SettlementActivity"
|
||||
android:exported="false" />
|
||||
|
||||
<activity
|
||||
android:name=".bantuan.BantuanActivity"
|
||||
android:exported="false" />
|
||||
@ -95,6 +99,10 @@
|
||||
android:name=".bantuan.BantuanFormActivity"
|
||||
android:exported="false" />
|
||||
|
||||
<activity
|
||||
android:name=".infotoko.InfoTokoActivity"
|
||||
android:exported="false" />
|
||||
|
||||
<activity android:name="com.sunmi.emv.l2.view.AppSelectActivity"/>
|
||||
</application>
|
||||
|
||||
|
@ -32,8 +32,12 @@ import com.example.bdkipoc.histori.HistoryActivity;
|
||||
import com.example.bdkipoc.transaction.CreateTransactionActivity;
|
||||
import com.example.bdkipoc.transaction.ResultTransactionActivity;
|
||||
|
||||
import com.example.bdkipoc.settlement.SettlementActivity;
|
||||
|
||||
import com.example.bdkipoc.bantuan.BantuanActivity;
|
||||
|
||||
import com.example.bdkipoc.infotoko.InfoTokoActivity;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
@ -311,23 +315,23 @@ public class MainActivity extends AppCompatActivity {
|
||||
startActivityWithAuth(new Intent(MainActivity.this, QrisActivity.class));
|
||||
// Col-2
|
||||
} else if (cardId == R.id.card_transfer) {
|
||||
navigateToCreateTransaction("transfer", cardId, "Transfer");
|
||||
Toast.makeText(this, "Transfer - Coming Soon", Toast.LENGTH_SHORT).show();
|
||||
} else if (cardId == R.id.card_uang_elektronik) {
|
||||
navigateToCreateTransaction("e_money", cardId, "Uang Elektronik");
|
||||
} else if (cardId == R.id.card_cetak_ulang) {
|
||||
startActivityWithAuth(new Intent(MainActivity.this, ReprintActivity.class));
|
||||
// Col-3
|
||||
} else if (cardId == R.id.card_refund) {
|
||||
navigateToCreateTransaction("refund", cardId, "Refund");
|
||||
Toast.makeText(this, "Refund - Coming Soon", Toast.LENGTH_SHORT).show();
|
||||
} else if (cardId == R.id.card_settlement) {
|
||||
Toast.makeText(this, "Settlement - Coming Soon", Toast.LENGTH_SHORT).show();
|
||||
startActivityWithAuth(new Intent(MainActivity.this, SettlementActivity.class));
|
||||
} else if (cardId == R.id.card_histori) {
|
||||
startActivityWithAuth(new Intent(MainActivity.this, HistoryActivity.class));
|
||||
// Col-4
|
||||
} else if (cardId == R.id.card_bantuan) {
|
||||
startActivityWithAuth(new Intent(MainActivity.this, BantuanActivity.class));
|
||||
} else if (cardId == R.id.card_info_toko) {
|
||||
Toast.makeText(this, "Info Toko - Coming Soon", Toast.LENGTH_SHORT).show();
|
||||
startActivityWithAuth(new Intent(MainActivity.this, InfoTokoActivity.class));
|
||||
} else if (cardId == R.id.card_pengaturan) {
|
||||
Toast.makeText(this, "Pengaturan - Coming Soon", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
|
@ -0,0 +1,314 @@
|
||||
package com.example.bdkipoc.infotoko;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewParent;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.cardview.widget.CardView;
|
||||
|
||||
import com.example.bdkipoc.LoginActivity;
|
||||
import com.example.bdkipoc.R;
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import com.google.android.material.textfield.TextInputEditText;
|
||||
import com.google.android.material.textfield.TextInputLayout;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class InfoTokoActivity extends AppCompatActivity {
|
||||
|
||||
private static final String TAG = "InfoTokoActivity";
|
||||
|
||||
// Views
|
||||
private TextView tvStoreName;
|
||||
private TextView tvMerchantId;
|
||||
private TextView tvTerminalId;
|
||||
|
||||
private TextInputEditText etEmail;
|
||||
private TextInputEditText etPassword;
|
||||
private TextInputEditText etOwnerName;
|
||||
private TextInputEditText etNik;
|
||||
private TextInputEditText etPhone;
|
||||
private TextInputEditText etBusinessType;
|
||||
private TextInputEditText etBusinessName;
|
||||
private TextInputEditText etAddress;
|
||||
|
||||
private MaterialButton btnUpdate;
|
||||
private ImageView btnBack;
|
||||
|
||||
// Data
|
||||
private String authToken;
|
||||
private JSONObject userData;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_info_toko);
|
||||
|
||||
// Check if user is logged in
|
||||
if (!LoginActivity.isLoggedIn(this)) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
// Initialize views
|
||||
initializeViews();
|
||||
|
||||
// Load user data
|
||||
loadUserData();
|
||||
|
||||
// Setup listeners
|
||||
setupListeners();
|
||||
|
||||
// Display store information
|
||||
displayStoreInfo();
|
||||
}
|
||||
|
||||
private void initializeViews() {
|
||||
// Header
|
||||
tvStoreName = findViewById(R.id.tv_store_name);
|
||||
tvMerchantId = findViewById(R.id.tv_merchant_id);
|
||||
tvTerminalId = findViewById(R.id.tv_terminal_id);
|
||||
btnBack = findViewById(R.id.btn_back);
|
||||
|
||||
// Account Information
|
||||
etEmail = findViewById(R.id.et_email);
|
||||
etPassword = findViewById(R.id.et_password);
|
||||
|
||||
// Store Information
|
||||
etOwnerName = findViewById(R.id.et_owner_name);
|
||||
etNik = findViewById(R.id.et_nik);
|
||||
etPhone = findViewById(R.id.et_phone);
|
||||
etBusinessType = findViewById(R.id.et_business_type);
|
||||
etBusinessName = findViewById(R.id.et_business_name);
|
||||
etAddress = findViewById(R.id.et_address);
|
||||
|
||||
// Button
|
||||
btnUpdate = findViewById(R.id.btn_update);
|
||||
}
|
||||
|
||||
private void loadUserData() {
|
||||
// Get authentication token
|
||||
authToken = getIntent().getStringExtra("AUTH_TOKEN");
|
||||
if (authToken == null) {
|
||||
authToken = LoginActivity.getToken(this);
|
||||
}
|
||||
|
||||
// Get user data
|
||||
String userDataString = getIntent().getStringExtra("USER_DATA");
|
||||
if (userDataString != null) {
|
||||
try {
|
||||
userData = new JSONObject(userDataString);
|
||||
} catch (JSONException e) {
|
||||
Log.e(TAG, "Error parsing user data: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
if (userData == null) {
|
||||
userData = LoginActivity.getUserDataAsJson(this);
|
||||
}
|
||||
|
||||
Log.d(TAG, "Loaded auth token: " + (authToken != null ? "✓" : "✗"));
|
||||
Log.d(TAG, "Loaded user data: " + (userData != null ? "✓" : "✗"));
|
||||
}
|
||||
|
||||
private void setupListeners() {
|
||||
// Back button
|
||||
if (btnBack != null) {
|
||||
btnBack.setOnClickListener(v -> finish());
|
||||
}
|
||||
|
||||
// Update button
|
||||
if (btnUpdate != null) {
|
||||
btnUpdate.setOnClickListener(v -> updateStoreInfo());
|
||||
}
|
||||
}
|
||||
|
||||
private void displayStoreInfo() {
|
||||
// Display store name and IDs (static for header)
|
||||
tvStoreName.setText("TOKO KLONTONG PAK EKO");
|
||||
tvMerchantId.setText("MID: 12345678901");
|
||||
tvTerminalId.setText("TID: 12345678901");
|
||||
|
||||
// Hide fields that are not needed based on requirements
|
||||
hideUnnecessaryFields();
|
||||
|
||||
// Display data from login response
|
||||
if (userData != null) {
|
||||
try {
|
||||
// Email - from API response
|
||||
String email = userData.optString("email", "");
|
||||
if (!email.isEmpty()) {
|
||||
etEmail.setText(email);
|
||||
} else {
|
||||
etEmail.setText("Email tidak tersedia");
|
||||
}
|
||||
|
||||
// Password - show masked placeholder (we don't store actual password)
|
||||
etPassword.setText("••••••••");
|
||||
etPassword.setEnabled(false); // Disable editing for security
|
||||
|
||||
// Nama Pemilik - from API response
|
||||
String ownerName = userData.optString("name", "");
|
||||
if (!ownerName.isEmpty()) {
|
||||
etOwnerName.setText(ownerName);
|
||||
} else {
|
||||
etOwnerName.setText("Nama tidak tersedia");
|
||||
}
|
||||
|
||||
// Nomor Telepon - from API response
|
||||
String phone = userData.optString("phone", "");
|
||||
if (!phone.isEmpty()) {
|
||||
etPhone.setText(phone);
|
||||
} else {
|
||||
etPhone.setText("Nomor telepon tidak tersedia");
|
||||
}
|
||||
|
||||
// Log the user data for debugging
|
||||
Log.d(TAG, "User Data: " + userData.toString());
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Error displaying user info: " + e.getMessage());
|
||||
Toast.makeText(this, "Error loading user data", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} else {
|
||||
// Show default/empty values if no user data
|
||||
etEmail.setText("Email tidak tersedia");
|
||||
etPassword.setText("••••••••");
|
||||
etPassword.setEnabled(false);
|
||||
etOwnerName.setText("Nama tidak tersedia");
|
||||
etPhone.setText("Nomor telepon tidak tersedia");
|
||||
}
|
||||
}
|
||||
|
||||
private void hideUnnecessaryFields() {
|
||||
// Hide NIK field and its container
|
||||
ViewParent nikContainer = etNik.getParent();
|
||||
if (nikContainer != null && nikContainer instanceof View) {
|
||||
((View) nikContainer).setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// Hide Business Type field and its container
|
||||
ViewParent businessTypeContainer = etBusinessType.getParent();
|
||||
if (businessTypeContainer != null && businessTypeContainer instanceof View) {
|
||||
((View) businessTypeContainer).setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// Hide Business Name field and its container
|
||||
ViewParent businessNameContainer = etBusinessName.getParent();
|
||||
if (businessNameContainer != null && businessNameContainer instanceof View) {
|
||||
((View) businessNameContainer).setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// Hide Address field and its container
|
||||
ViewParent addressContainer = etAddress.getParent();
|
||||
if (addressContainer != null && addressContainer instanceof View) {
|
||||
((View) addressContainer).setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateStoreInfo() {
|
||||
// Validate inputs
|
||||
if (!validateInputs()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Show loading
|
||||
btnUpdate.setEnabled(false);
|
||||
btnUpdate.setText("Memperbarui...");
|
||||
|
||||
// Simulate update process (in real app, this would call API)
|
||||
btnUpdate.postDelayed(() -> {
|
||||
// In a real implementation, you would:
|
||||
// 1. Call API to update user info
|
||||
// 2. Update SharedPreferences with new data
|
||||
// 3. Show success/error message
|
||||
|
||||
// Show success message
|
||||
Toast.makeText(this, "Informasi akun berhasil diperbarui", Toast.LENGTH_SHORT).show();
|
||||
|
||||
// Reset button state
|
||||
btnUpdate.setEnabled(true);
|
||||
btnUpdate.setText("Perbarui Informasi Toko");
|
||||
|
||||
// Optional: Save updated data locally
|
||||
saveUpdatedData();
|
||||
|
||||
}, 2000); // Simulate 2 second delay
|
||||
}
|
||||
|
||||
private boolean validateInputs() {
|
||||
// Check email
|
||||
String email = etEmail.getText().toString().trim();
|
||||
if (email.isEmpty()) {
|
||||
etEmail.setError("Email tidak boleh kosong");
|
||||
etEmail.requestFocus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches()) {
|
||||
etEmail.setError("Format email tidak valid");
|
||||
etEmail.requestFocus();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check owner name
|
||||
String ownerName = etOwnerName.getText().toString().trim();
|
||||
if (ownerName.isEmpty()) {
|
||||
etOwnerName.setError("Nama pemilik tidak boleh kosong");
|
||||
etOwnerName.requestFocus();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check phone
|
||||
String phone = etPhone.getText().toString().trim();
|
||||
if (phone.isEmpty()) {
|
||||
etPhone.setError("Nomor telepon tidak boleh kosong");
|
||||
etPhone.requestFocus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (phone.length() < 10) {
|
||||
etPhone.setError("Nomor telepon tidak valid");
|
||||
etPhone.requestFocus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void saveUpdatedData() {
|
||||
|
||||
try {
|
||||
JSONObject updatedData = new JSONObject();
|
||||
updatedData.put("email", etEmail.getText().toString().trim());
|
||||
updatedData.put("name", etOwnerName.getText().toString().trim());
|
||||
updatedData.put("phone", etPhone.getText().toString().trim());
|
||||
|
||||
// Merge with existing userData
|
||||
if (userData != null) {
|
||||
// Keep other fields from original userData
|
||||
updatedData.put("id", userData.optString("id", ""));
|
||||
updatedData.put("role", userData.optString("role", ""));
|
||||
// Add other fields as needed
|
||||
}
|
||||
|
||||
Log.d(TAG, "Updated data: " + updatedData.toString());
|
||||
|
||||
} catch (JSONException e) {
|
||||
Log.e(TAG, "Error creating updated data: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
super.onBackPressed();
|
||||
finish();
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.example.bdkipoc;
|
||||
package com.example.bdkipoc.settlement;
|
||||
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
@ -25,6 +25,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.example.bdkipoc.R;
|
||||
|
||||
public class SettlementActivity extends AppCompatActivity {
|
||||
|
||||
private TextView tvTotalAmount;
|
||||
|
319
app/src/main/res/layout/activity_info_toko.xml
Normal file
319
app/src/main/res/layout/activity_info_toko.xml
Normal file
@ -0,0 +1,319 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="#E53935"
|
||||
tools:context=".InfoTokoActivity">
|
||||
|
||||
<!-- Header with back button -->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_back"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_arrow_back"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="Back"
|
||||
app:tint="@android:color/white" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="Info Toko"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Red background section with logo and store info -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="24dp"
|
||||
android:background="#E53935">
|
||||
|
||||
<!-- Logo -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
app:cardCornerRadius="60dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_logo_icon"
|
||||
android:scaleType="centerCrop"
|
||||
android:contentDescription="Logo Pak Eko" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Store Name -->
|
||||
<TextView
|
||||
android:id="@+id/tv_store_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="TOKO KLONTONG PAK EKO"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- MID and TID -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_merchant_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="MID: 12345678901"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:text="|"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_terminal_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TID: 12345678901"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- White card with store information -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="-16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<!-- Account Information Section -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Informasi Akun"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- Email -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="Email"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textEmailAddress"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- Password -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="Kata Sandi"
|
||||
app:passwordToggleEnabled="true"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<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:textSize="14sp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- Store Information Section -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="Informasi Pemilik"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- Owner Name -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="Nama Pemilik"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_owner_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPersonName"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- Phone Number -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="Nomor Telepon"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="phone"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- Hidden fields that will be programmatically hidden -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="NIK"
|
||||
android:visibility="gone"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_nik"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="Jenis Usaha"
|
||||
android:visibility="gone"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_business_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="Nama Usaha"
|
||||
android:visibility="gone"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_business_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="Alamat"
|
||||
android:visibility="gone"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textMultiLine"
|
||||
android:minLines="3"
|
||||
android:gravity="top"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Update Button -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_update"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:text="Perbarui Informasi Toko"
|
||||
android:textAllCaps="false"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/black"
|
||||
app:cornerRadius="28dp"
|
||||
android:backgroundTint="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
Loading…
x
Reference in New Issue
Block a user