Commit cf354016 authored by iman Fauzi's avatar iman Fauzi

editing unecessary

parent 77e8387e
......@@ -77,13 +77,14 @@ public class CartActivity extends AppCompatActivity {
tvTotal.setText(setToRp().format((double) count));
}
public void setRp() {
}
private NumberFormat setToRp() {
Locale ID = new Locale("in", "ID");
return NumberFormat.getCurrencyInstance(ID);
}
}
\ No newline at end of file
}
/**
* Harga belum bisa di beri String (Rp)
*/
\ No newline at end of file
......@@ -39,8 +39,7 @@ public class MainActivity extends AppCompatActivity {
int id = item.getItemId();
if (id == R.id.menu_cart){
startActivity(new Intent(getApplicationContext(), PaymentActivity.class));
Toast.makeText(MainActivity.this, "Pesan cart", Toast.LENGTH_LONG).show();
startActivity(new Intent(getApplicationContext(), CartActivity.class));
}
return true;
}
......
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:tools="http://schemas.android.com/tools"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<include
android:id="@+id/cAppBar"
layout="@layout/app_bar"/>
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
app:layout_constraintTop_toBottomOf="@id/cAppBar">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
......@@ -118,3 +129,14 @@
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.button.MaterialButton
android:id="@+id/btCheckout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/title_checkout"
android:layout_margin="10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment