Commit fccf058b authored by Ahmad Abi Mulya's avatar Ahmad Abi Mulya Committed by Wahyu Wibowo

Activate btnBack in Cart Activity, and Change title in Add Product Activity

parent c78f60ad
......@@ -2,15 +2,27 @@ package com.example.yourcashiertest.activities;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import com.example.yourcashiertest.R;
public class CartActivity extends AppCompatActivity {
ImageView btnBack;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_cart);
btnBack = findViewById(R.id.ivBtnBack);
btnBack.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(CartActivity.this, MainActivity.class));
}
});
}
}
\ No newline at end of file
......@@ -9,7 +9,7 @@
<ImageView
android:id="@+id/imageView2"
android:id="@+id/ivBtnBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_baseline_arrow_back_ios_24"
......@@ -28,8 +28,8 @@
android:text="@string/cart"
android:textAppearance="@style/cart"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/imageView2"
app:layout_constraintTop_toBottomOf="@+id/imageView2"
app:layout_constraintStart_toStartOf="@+id/ivBtnBack"
app:layout_constraintTop_toBottomOf="@+id/ivBtnBack"
app:layout_constraintVertical_bias="0.061" />
<TextView
......
......@@ -113,6 +113,8 @@
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/rectangle_4"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:overScrollMode="never"
android:padding="@dimen/space_small"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
......
......@@ -16,7 +16,7 @@
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:background="@color/colorBackground"
android:background="@color/white"
android:layout_height="wrap_content">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/tvHeadProduct"
......@@ -24,7 +24,7 @@
android:layout_height="wrap_content"
android:textSize="24dp"
android:layout_margin="@dimen/space_default"
android:text="Tambah Product"/>
android:text="ADD PRODUCT"/>
<ScrollView
android:layout_width="match_parent"
......@@ -164,12 +164,6 @@
app:cornerRadius="@dimen/space_default"
android:elevation="5dp" />
</RelativeLayout>
</ScrollView>
</LinearLayout>
</layout>
\ 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