profile actions

This commit is contained in:
cimenmus
2017-10-25 00:07:05 +03:00
parent 95da99ba07
commit 40a660239c
25 changed files with 967 additions and 210 deletions

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.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"
tools:context="ch.pizzalink.android.activity.AddAddressActivity">
</android.support.constraint.ConstraintLayout>

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
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="@color/white"
tools:context="ch.pizzalink.android.activity.MyAddressesActivity">
<ch.pizzalink.android.view.PizzalinkToolbar
android:id="@+id/myAddressesToolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/my_addresses"
android:background="@color/white"
app:showBackIcon="true"
app:titleTextColor="@color/black" />
<android.support.v7.widget.RecyclerView
android:id="@+id/myAddressesRecyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/myAddressesToolbar"
android:layout_above="@+id/addNewAddressButton"/>
<Button
android:id="@+id/addNewAddressButton"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
style="@style/PizzalinkButton"
android:text="@string/add_new_address"
android:layout_alignParentBottom="true"/>
</RelativeLayout>

View File

@@ -0,0 +1,55 @@
<?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:background="@color/white"
android:orientation="vertical"
tools:context="ch.pizzalink.android.activity.UpdatePasswordActivity">
<ch.pizzalink.android.view.PizzalinkToolbar
android:id="@+id/updatePasswordToolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/activity_title_update_password"
android:background="@color/white"
app:showBackIcon="true"
app:titleTextColor="@color/black" />
<ch.pizzalink.android.view.PizzalinkEditText
android:id="@+id/oldPasswordPizzalinkEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:inputType="password"
app:hint="@string/hint_old_password"/>
<ch.pizzalink.android.view.PizzalinkEditText
android:id="@+id/newPasswordPizzalinkEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:inputType="password"
app:hint="@string/hint_new_password"/>
<ch.pizzalink.android.view.PizzalinkEditText
android:id="@+id/confirmNewPasswordPizzalinkEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:inputType="password"
app:hint="@string/hint_confirm_new_password"/>
<android.support.v4.widget.Space
android:layout_width="match_parent"
android:layout_height="16dp" />
<Button
android:id="@+id/updatePasswordButton"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
style="@style/PizzalinkButton"
android:text="@string/update_app" />
</LinearLayout>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -19,151 +19,35 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp">
<ch.pizzalink.android.view.PizzalinkInfoView
android:id="@+id/orderPersonFullnamePizzalinkInfoLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:description="@string/order_person_fullname" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/order_person_fullname"
android:textStyle="bold"
android:textSize="12sp"
android:textColor="@color/heater"/>
<ch.pizzalink.android.view.PizzalinkInfoView
android:id="@+id/orderShippingMethodPizzalinkInfoLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:description="@string/order_shipping_method" />
<TextView
android:id="@+id/orderPersonFullnameTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Aytaç Cici"
android:layout_marginTop="4dp"
android:textStyle="bold"
android:textColor="@color/black"/>
<ch.pizzalink.android.view.PizzalinkInfoView
android:id="@+id/orderShippingAddressPizzalinkInfoLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:description="@string/order_shipping_address" />
</LinearLayout>
<ch.pizzalink.android.view.PizzalinkInfoView
android:id="@+id/orderPaymentMethodPizzalinkInfoLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:description="@string/order_payment_method" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="8dp"
android:paddingLeft="16dp"
android:paddingStart="16dp"
android:paddingRight="16dp"
android:paddingEnd="16dp"
android:paddingBottom="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/order_shipping_method"
android:textStyle="bold"
android:textSize="12sp"
android:textColor="@color/heater"/>
<TextView
android:id="@+id/orderShippingMethodTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Selber Abholen"
android:textColor="@color/black"
android:layout_marginTop="4dp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="8dp"
android:paddingLeft="16dp"
android:paddingStart="16dp"
android:paddingRight="16dp"
android:paddingEnd="16dp"
android:paddingBottom="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/order_shipping_address"
android:textStyle="bold"
android:textSize="12sp"
android:textColor="@color/heater"/>
<TextView
android:id="@+id/orderShippingAddressTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="Aytaç Cici A Street B. Avanue 1004 ABC Schweiz"
android:textColor="@color/black"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="8dp"
android:paddingLeft="16dp"
android:paddingStart="16dp"
android:paddingRight="16dp"
android:paddingEnd="16dp"
android:paddingBottom="16dp">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/order_payment_method"
android:textColor="@color/heater"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="@+id/orderPaymentMethodTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Kreditkarten-Kartenzahlung"
android:textColor="@color/black"
android:layout_marginTop="4dp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="8dp"
android:paddingLeft="16dp"
android:paddingStart="16dp"
android:paddingRight="16dp"
android:paddingEnd="16dp"
android:paddingBottom="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/order_total"
android:textColor="@color/heater"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="@+id/orderTotalTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="CHF 30.00"
android:textColor="@color/black"
android:textStyle="bold" />
</LinearLayout>
<ch.pizzalink.android.view.PizzalinkInfoView
android:id="@+id/orderTotalPizzalinkInfoLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:description="@string/order_total" />
</LinearLayout>

View File

@@ -1,26 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/actvity_default_background_color_1">
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:background="@color/white">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Profile Fragment"
android:layout_centerInParent="true"
android:textColor="@color/black"/>
<Button
android:id="@+id/logoutButton"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:text="@string/button_logout"
style="@style/PizzalinkButton"
android:layout_alignParentBottom="true"/>
android:layout_height="wrap_content"
android:orientation="vertical">
</RelativeLayout>
<ch.pizzalink.android.view.PizzalinkInfoView
android:id="@+id/firstnamePizzalinkInfoLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:description="@string/profile_firstname" />
<ch.pizzalink.android.view.PizzalinkInfoView
android:id="@+id/lastnamePizzalinkInfoLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:description="@string/profile_lastname" />
<ch.pizzalink.android.view.PizzalinkInfoView
android:id="@+id/emailPizzalinkInfoLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:description="@string/profile_email" />
<ch.pizzalink.android.view.PizzalinkInfoView
android:id="@+id/phonePizzalinkInfoLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:description="@string/profile_telephone" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@drawable/shadow"/>
<RelativeLayout
android:id="@+id/myAddressesLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/my_addresses"
android:layout_marginTop="4dp"
android:textColor="@color/black"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_toLeftOf="@+id/arrow1"
android:layout_toStartOf="@+id/arrow1"/>
<ImageView
android:id="@+id/arrow1"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_back"
android:tint="@color/venus"
android:padding="6dp"
android:rotation="180"/>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@drawable/shadow"/>
<RelativeLayout
android:id="@+id/updatePasswordLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/update_password"
android:layout_marginTop="4dp"
android:textColor="@color/black"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_toLeftOf="@+id/arrow2"
android:layout_toStartOf="@+id/arrow2"/>
<ImageView
android:id="@+id/arrow2"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_back"
android:tint="@color/venus"
android:padding="6dp"
android:rotation="180"/>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@drawable/shadow"/>
<RelativeLayout
android:id="@+id/logoutLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_logout"
android:layout_marginTop="4dp"
android:textColor="@color/black"
android:layout_centerVertical="true" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@drawable/shadow"/>
</LinearLayout>
</ScrollView>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:id="@+id/descriptionTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/order_person_fullname"
android:textColor="@color/heater"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="@+id/infoTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Aytaç Cici"
android:layout_marginTop="4dp"
android:textStyle="bold"
android:textColor="@color/black"/>
</LinearLayout>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:padding="12dp">
<TextView
android:id="@+id/addressTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="48dp"
android:layout_marginEnd="24dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_toLeftOf="@+id/deleteAddressImageView"
android:layout_toStartOf="@+id/deleteAddressImageView"
android:layout_centerVertical="true"
android:textColor="@color/black" />
<ImageView
android:id="@+id/deleteAddressImageView"
android:layout_width="32dp"
android:layout_height="32dp"
android:padding="8dp"
android:src="@drawable/ic_cancel_2"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"/>
</RelativeLayout>

View File

@@ -23,4 +23,9 @@
<attr name="dropdownHint" format="string" />
</declare-styleable>
<declare-styleable name="PizzalinkInfoView">
<attr name="description" format="string" />
<attr name="infoText" format="string" />
</declare-styleable>
</resources>

View File

@@ -73,7 +73,7 @@
<!-- LoginActivity-->
<!-- ProfileFragment-->
<string name="button_logout">ÇIKIŞ YAP</string>
<string name="button_logout">Çıkış Yap</string>
<!-- ProfileFragment-->
<!-- OrderHistoryFragment-->
@@ -153,10 +153,35 @@
<string name="order_total">TOTAL</string>
<!-- OrderSummaryFragment-->
<!-- ProfileFragment-->
<string name="profile_firstname">AD</string>
<string name="profile_lastname">SOYAD</string>
<string name="profile_telephone">TELEFON NUMARASI</string>
<string name="profile_email">EMAIL</string>
<string name="my_addresses">Adreslerim</string>
<string name="update_password">Şifremi Güncelle</string>
<!-- ProfileFragment-->
<!-- OrderResultFragment-->
<string name="order_successed">Siparişiniz başarı ile alınmıştır. Siparişinizin detaylarını sipariş geçmişinden görebilir ve siparişinizi takip edebilirsiniz.</string>
<!-- OrderSummaryFragment-->
<!-- UpdatePasswordActivity-->
<string name="activity_title_update_password">Şifre Güncelle</string>
<string name="hint_old_password">Eski Şifre</string>
<string name="hint_new_password">Yeni Şifre</string>
<string name="hint_confirm_new_password">Yeni Şifre (Tekrar)</string>
<string name="password_updated">Şifreniz başarı ile güncellenmiştir.</string>
<!-- UpdatePasswordActivity-->
<!-- MyAddressesActivity-->
<string name="activity_title_my_addresses">Adreslerim</string>
<string name="add_new_address">EKLE</string>
<string name="new_address_added">Adresiniz başarı ile eklendi.</string>
<string name="alert_delete_address">Adresinizi silmek istediğinize emin misiniz?</string>
<string name="address_deleted">Adresiniz başarı ile silindi.</string>
<!-- MyAddressesActivity-->
<string-array name="stepperLabels">
<item>Shipping Method</item>
<item>Shipping Address</item>