button and edittext views
This commit is contained in:
@@ -5,7 +5,7 @@ android {
|
||||
buildToolsVersion "26.0.1"
|
||||
defaultConfig {
|
||||
applicationId "ch.pizzalink.android"
|
||||
minSdkVersion 15
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 26
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
package ch.pizzalink.android.activity;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.util.Log;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -12,6 +17,7 @@ import ch.pizzalink.android.R;
|
||||
import ch.pizzalink.android.api.ApiErrorUtils;
|
||||
import ch.pizzalink.android.api.ApiService;
|
||||
import ch.pizzalink.android.helper.DialogHelper;
|
||||
import ch.pizzalink.android.helper.DisplayHelper;
|
||||
import ch.pizzalink.android.helper.NetworkHelper;
|
||||
import ch.pizzalink.android.helper.SessionHelper;
|
||||
import ch.pizzalink.android.helper.SharedPrefsHelper;
|
||||
@@ -28,6 +34,7 @@ public class SplashActivity extends BaseActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_splash);
|
||||
ButterKnife.bind(this);
|
||||
DisplayHelper.changeStatusColor();
|
||||
if(NetworkHelper.isNetworkAvailable())
|
||||
getCategoryList();
|
||||
else
|
||||
@@ -73,7 +80,8 @@ public class SplashActivity extends BaseActivity {
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
startActivity(new Intent(SplashActivity.this, cls));
|
||||
//startActivity(new Intent(SplashActivity.this, cls));
|
||||
startActivity(new Intent(SplashActivity.this, RegisterActivity.class));
|
||||
finish();
|
||||
}
|
||||
}, 1000);
|
||||
@@ -107,4 +115,6 @@ public class SplashActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
package ch.pizzalink.android.helper;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.os.Build;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import ch.pizzalink.android.R;
|
||||
import ch.pizzalink.android.activity.BaseActivity;
|
||||
|
||||
public class DisplayHelper {
|
||||
@@ -19,4 +26,14 @@ public class DisplayHelper {
|
||||
DisplayMetrics displayMetrics = BaseActivity.currentActivity.getResources().getDisplayMetrics();
|
||||
return Math.round(px / (displayMetrics.xdpi / DisplayMetrics.DENSITY_DEFAULT));
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
public static void changeStatusColor() {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
|
||||
return;
|
||||
Window window = BaseActivity.currentActivity.getWindow();
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||
window.setStatusBarColor(ContextCompat.getColor(BaseActivity.currentActivity, R.color.black));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
package ch.pizzalink.android.view;
|
||||
|
||||
/**
|
||||
* Created by cimenmus on 12/09/2017.
|
||||
*/
|
||||
|
||||
public class OvalEdittext {
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package ch.pizzalink.android.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import ch.pizzalink.android.R;
|
||||
|
||||
/**
|
||||
* Created by cimenmus on 28/09/2017.
|
||||
*/
|
||||
|
||||
public class PizzalinkButton extends RelativeLayout {
|
||||
|
||||
private View rootView;
|
||||
private boolean isEnabled;
|
||||
private Button pizzalinkButton;
|
||||
private String text;
|
||||
|
||||
public PizzalinkButton(Context context) {
|
||||
super(context);
|
||||
init(context);
|
||||
}
|
||||
|
||||
public PizzalinkButton(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.PizzalinkButton, 0, 0);
|
||||
try {
|
||||
isEnabled = a.getBoolean(R.styleable.PizzalinkButton_isEnabled, true);
|
||||
text = a.getString(R.styleable.PizzalinkButton_text);
|
||||
} finally {
|
||||
a.recycle();
|
||||
}
|
||||
init(context);
|
||||
}
|
||||
|
||||
private void init(Context context){
|
||||
rootView = inflate(context, R.layout.layout_pizzalink_button, this);
|
||||
pizzalinkButton = (Button) rootView.findViewById(R.id.pizzalinkButton);
|
||||
pizzalinkButton.setText(text);
|
||||
setButtonAppearance(context);
|
||||
}
|
||||
|
||||
public void setEnabled(Context context, boolean isEnabled){
|
||||
this.isEnabled = isEnabled;
|
||||
setButtonAppearance(context);
|
||||
}
|
||||
|
||||
public void setOnClickListenrer(OnClickListener onClickListenrer){
|
||||
rootView.setOnClickListener(onClickListenrer);
|
||||
}
|
||||
|
||||
private void setButtonAppearance(Context context){
|
||||
if(isEnabled){
|
||||
pizzalinkButton.setBackground(ContextCompat.getDrawable(context, R.drawable.background_button_enabled));
|
||||
pizzalinkButton.setTextColor(ContextCompat.getColor(context, R.color.colorPrimary));
|
||||
}else {
|
||||
pizzalinkButton.setBackground(ContextCompat.getDrawable(context, R.drawable.background_button_disabled));
|
||||
pizzalinkButton.setTextColor(ContextCompat.getColor(context, R.color.venus));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package ch.pizzalink.android.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Typeface;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.text.InputType;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import ch.pizzalink.android.R;
|
||||
import ch.pizzalink.android.activity.BaseActivity;
|
||||
|
||||
/**
|
||||
* Created by cimenmus on 28/09/2017.
|
||||
*/
|
||||
|
||||
public class PizzalinkEditText extends LinearLayout implements View.OnClickListener {
|
||||
|
||||
private View rootView;
|
||||
private TextView hintTextView;
|
||||
private EditText editText;
|
||||
private boolean isPasswordHidden = true;
|
||||
private Typeface typeFace;
|
||||
private String hint;
|
||||
private String inputType;
|
||||
|
||||
/*
|
||||
public PizzalinkEditText(LinearLayout rootView, boolean isLeftIconVisible, int leftIconId,
|
||||
int editTextHintId, int inputType, boolean isPasswordIconVisible){
|
||||
|
||||
initViews(rootView);
|
||||
setLeftIcon(isLeftIconVisible, leftIconId);
|
||||
setPasswordIcon(isPasswordIconVisible);
|
||||
setEditTextt(editTextHintId, inputType);
|
||||
}
|
||||
*/
|
||||
|
||||
public PizzalinkEditText(Context context) {
|
||||
super(context);
|
||||
init(context);
|
||||
}
|
||||
|
||||
public PizzalinkEditText(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.PizzalinkEditText, 0, 0);
|
||||
try {
|
||||
hint = a.getString(R.styleable.PizzalinkEditText_hint);
|
||||
inputType = a.getString(R.styleable.PizzalinkEditText_inputType);
|
||||
} finally {
|
||||
a.recycle();
|
||||
}
|
||||
init(context);
|
||||
}
|
||||
|
||||
private void init(Context context) {
|
||||
rootView = inflate(context, R.layout.layout_pizzalink_edittext, this);
|
||||
hintTextView = (TextView) rootView.findViewById(R.id.hintTextView);
|
||||
editText = (EditText) rootView.findViewById(R.id.editText);
|
||||
hintTextView.setText(hint);
|
||||
setInputType();
|
||||
rootView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
focusEditText();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setInputType(){
|
||||
if (inputType == null)
|
||||
inputType = "text";
|
||||
switch (inputType){
|
||||
case "password":
|
||||
editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
|
||||
break;
|
||||
case "phone":
|
||||
editText.setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS | InputType.TYPE_CLASS_PHONE);
|
||||
break;
|
||||
case "email":
|
||||
editText.setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
|
||||
break;
|
||||
default:
|
||||
editText.setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS | InputType.TYPE_CLASS_TEXT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
hideShowPassword();
|
||||
}
|
||||
|
||||
private void hideShowPassword(){
|
||||
|
||||
if(isPasswordHidden)
|
||||
editText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
|
||||
else
|
||||
editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
|
||||
|
||||
isPasswordHidden = !isPasswordHidden;
|
||||
editText.setTypeface(typeFace);
|
||||
}
|
||||
|
||||
private void focusEditText(){
|
||||
|
||||
editText.requestFocus();
|
||||
InputMethodManager inputMethodManager=(InputMethodManager)BaseActivity.currentActivity.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED,0);
|
||||
}
|
||||
|
||||
public TextView getHintTextView() {
|
||||
return hintTextView;
|
||||
}
|
||||
|
||||
public EditText getEditText() {
|
||||
return editText;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package ch.pizzalink.android.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Color;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.util.AttributeSet;
|
||||
@@ -18,11 +19,12 @@ import ch.pizzalink.android.activity.BaseActivity;
|
||||
|
||||
public class PizzalinkToolbar extends Toolbar {
|
||||
|
||||
private View rootView;;
|
||||
private View rootView;
|
||||
private TextView toolbarTitleTextView;
|
||||
private ImageView hamburgerIcon;
|
||||
private boolean showHamburgerIcon;
|
||||
private String title;
|
||||
private int toolbarBackgroundColor, titleTextColor;
|
||||
|
||||
/*
|
||||
public PizzalinkToolbar(Toolbar toolbar){
|
||||
@@ -43,6 +45,13 @@ public class PizzalinkToolbar extends Toolbar {
|
||||
try {
|
||||
showHamburgerIcon = a.getBoolean(R.styleable.PizzalinkToolbar_showHamburgerMenuIcon, false);
|
||||
title = a.getString(R.styleable.PizzalinkToolbar_title);
|
||||
/*
|
||||
toolbarBackgroundColor = a.getColor(R.styleable.PizzalinkToolbar_toolbarBackgroundColor,
|
||||
ContextCompat.getColor(BaseActivity.currentActivity, R.color.colorPrimary));
|
||||
titleTextColor = a.getColor(R.styleable.PizzalinkToolbar_toolbarTitleTextColor,
|
||||
ContextCompat.getColor(BaseActivity.currentActivity, R.color.white));
|
||||
*/
|
||||
|
||||
} finally {
|
||||
a.recycle();
|
||||
}
|
||||
@@ -54,6 +63,8 @@ public class PizzalinkToolbar extends Toolbar {
|
||||
this.setPadding(0, 0, 0, 0);
|
||||
this.setContentInsetsAbsolute(0, 0);
|
||||
toolbarTitleTextView = (TextView) rootView.findViewById(R.id.toolbarTitleTextView);
|
||||
//this.setBackgroundResource(toolbarBackgroundColor);
|
||||
//toolbarTitleTextView.setTextColor(titleTextColor);
|
||||
hamburgerIcon = (ImageView) rootView.findViewById(R.id.hamburgerIcon);
|
||||
if(showHamburgerIcon)
|
||||
hamburgerIcon.setVisibility(VISIBLE);
|
||||
|
||||
9
app/src/main/res/drawable/background_button_disabled.xml
Normal file
9
app/src/main/res/drawable/background_button_disabled.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white"/>
|
||||
<stroke
|
||||
android:color="@color/venus"
|
||||
android:width="1dp"/>
|
||||
<corners android:radius="1dp"/>
|
||||
</shape>
|
||||
9
app/src/main/res/drawable/background_button_enabled.xml
Normal file
9
app/src/main/res/drawable/background_button_enabled.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white"/>
|
||||
<stroke
|
||||
android:color="@color/colorPrimary"
|
||||
android:width="1dp"/>
|
||||
<corners android:radius="1dp"/>
|
||||
</shape>
|
||||
BIN
app/src/main/res/drawable/pizzalink_logo.png
Normal file
BIN
app/src/main/res/drawable/pizzalink_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
@@ -1,9 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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="@color/white"
|
||||
tools:context="ch.pizzalink.android.activity.LoginActivity">
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -1,9 +1,116 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout 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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white"
|
||||
tools:context="ch.pizzalink.android.activity.RegisterActivity">
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
<ch.pizzalink.android.view.PizzalinkToolbar
|
||||
android:id="@+id/registerToolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:title="@string/activity_title_register"
|
||||
android:background="@color/white"
|
||||
app:titleTextColor="@color/black" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="none"
|
||||
android:layout_below="@+id/registerToolbar"
|
||||
android:layout_above="@+id/registerButton">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white"
|
||||
tools:context="ch.pizzalink.android.activity.LoginActivity">
|
||||
|
||||
<ch.pizzalink.android.view.PizzalinkEditText
|
||||
android:id="@+id/firstnamePizzalinkEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hint="@string/firstname"/>
|
||||
|
||||
<ch.pizzalink.android.view.PizzalinkEditText
|
||||
android:id="@+id/lasstnamePizzalinkEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hint="@string/lastname"/>
|
||||
|
||||
<ch.pizzalink.android.view.PizzalinkEditText
|
||||
android:id="@+id/telephonePizzalinkEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hint="@string/telephone"
|
||||
app:inputType="phone"/>
|
||||
|
||||
<ch.pizzalink.android.view.PizzalinkEditText
|
||||
android:id="@+id/emailPizzalinkEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hint="@string/email"
|
||||
app:inputType="email"/>
|
||||
|
||||
<ch.pizzalink.android.view.PizzalinkEditText
|
||||
android:id="@+id/passwordPizzalinkEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hint="@string/password"
|
||||
app:inputType="password"/>
|
||||
|
||||
<ch.pizzalink.android.view.PizzalinkEditText
|
||||
android:id="@+id/passwordAgainPizzalinkEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hint="@string/password_again"
|
||||
app:inputType="password"/>
|
||||
|
||||
<ch.pizzalink.android.view.PizzalinkEditText
|
||||
android:id="@+id/address1PizzalinkEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hint="@string/addres_line_1"/>
|
||||
|
||||
<ch.pizzalink.android.view.PizzalinkEditText
|
||||
android:id="@+id/address2PizzalinkEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hint="@string/addres_line_2"/>
|
||||
|
||||
<ch.pizzalink.android.view.PizzalinkEditText
|
||||
android:id="@+id/cityPizzalinkEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hint="@string/city"/>
|
||||
|
||||
<ch.pizzalink.android.view.PizzalinkEditText
|
||||
android:id="@+id/postcodePizzalinkEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hint="@string/postcode"/>
|
||||
|
||||
<android.support.v4.widget.Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<ch.pizzalink.android.view.PizzalinkButton
|
||||
android:id="@+id/registerButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:isEnabled="false"
|
||||
app:text="@string/activity_title_register"
|
||||
android:layout_alignParentBottom="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout 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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="ch.pizzalink.android.activity.SplashActivity">
|
||||
tools:context="ch.pizzalink.android.activity.SplashActivity"
|
||||
android:background="@color/black">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="Hello World!"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:layout_margin="48dp"
|
||||
android:src="@drawable/pizzalink_logo"/>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
20
app/src/main/res/layout/layout_pizzalink_button.xml
Normal file
20
app/src/main/res/layout/layout_pizzalink_button.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<Button
|
||||
android:id="@+id/pizzalinkButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:textColor="@color/white"
|
||||
android:background="@drawable/background_button_enabled"/>
|
||||
|
||||
</RelativeLayout>
|
||||
44
app/src/main/res/layout/layout_pizzalink_edittext.xml
Normal file
44
app/src/main/res/layout/layout_pizzalink_edittext.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:layout_marginEnd="24dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/hintTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/venus"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="4dp"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="24dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
android:textColorHint="@color/row_pizza_ingredients_background"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_marginBottom="12dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/row_pizza_ingredients_background"
|
||||
android:layout_marginTop="2dp"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,7 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<declare-styleable name="PizzalinkToolbar">
|
||||
<attr name="showHamburgerMenuIcon" format="boolean" />
|
||||
<attr name="title" format="string" />
|
||||
<attr name="toolbarBackgroundColor" format="reference" />
|
||||
<attr name="toolbarTitleTextColor" format="reference" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="PizzalinkEditText">
|
||||
<attr name="hint" format="string" />
|
||||
<attr name="inputType" format="string" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="PizzalinkButton">
|
||||
<attr name="isEnabled" format="boolean" />
|
||||
<attr name="text" format="string" />
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
@@ -16,4 +16,12 @@
|
||||
<color name="actvity_default_background_color_1">#EEEEEE</color>
|
||||
<color name="actvity_default_background_color_2">#FAFAFA</color>
|
||||
|
||||
<color name="login_background">#F5F5F5</color>
|
||||
|
||||
|
||||
<color name="ghost_white">#F4F4F5</color>
|
||||
<color name="quartz">#DCDCDD</color>
|
||||
<color name="venus">#7F797C</color>
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -44,6 +44,24 @@
|
||||
<string name="fragment_title_item_beer_drinks">Beer</string>
|
||||
<string name="fragment_title_dessert">Dessert</string>
|
||||
|
||||
<!-- LoginActivity-->
|
||||
<string name="activity_title_login">Giriş Yap</string>
|
||||
<string name="firstname">Ad</string>
|
||||
<string name="lastname">Soyad</string>
|
||||
<string name="telephone">Telefon Numarası</string>
|
||||
<string name="email">Email</string>
|
||||
<string name="password">Şifre</string>
|
||||
<string name="password_again">Şifre (Tekrar)</string>
|
||||
<string name="addres_line_1">Adres 1</string>
|
||||
<string name="addres_line_2">Adres 2</string>
|
||||
<string name="city">Şehir</string>
|
||||
<string name="postcode">Posta Kodu</string>
|
||||
<!-- LoginActivity-->
|
||||
|
||||
<!-- RegisterActivity-->
|
||||
<string name="activity_title_register">Kayıt Ol</string>
|
||||
<!-- RegisterActivity-->
|
||||
|
||||
<string name="alert">Uyarı</string>
|
||||
<string name="error_message">Bir hata oluştu.</string>
|
||||
<string name="no_network_message">İnternet bağlanıtısı yok. Lütfen daha sonra tekrar deneyiniz.</string>
|
||||
|
||||
Reference in New Issue
Block a user