register
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -37,7 +37,7 @@
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
@@ -2,6 +2,7 @@ package ch.pizzalink.android.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.RelativeLayout;
|
||||
@@ -88,18 +89,6 @@ public class RegisterActivity extends BaseActivity {
|
||||
onBackPressed();
|
||||
}
|
||||
});
|
||||
zonePizzalinkDropdown.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showZoneDialog();
|
||||
}
|
||||
});
|
||||
countryPizzalinkDropdown.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showCountryDialog();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private boolean checkFields(){
|
||||
@@ -269,11 +258,19 @@ public class RegisterActivity extends BaseActivity {
|
||||
params.put("address_2", "");
|
||||
params.put("city", pizzalinkEditTextList.get(7).getText());
|
||||
params.put("postcode", postcodePizzalinkDrowpdown.getText());
|
||||
params.put("zone_id", "1");
|
||||
params.put("country_id", "1");
|
||||
params.put("zone_id", selectedZoneModel.getStoreId());
|
||||
params.put("country_id", selectedCountryModel.getId());
|
||||
return params;
|
||||
}
|
||||
|
||||
private void onZoneDropdownClicked(View view){
|
||||
Log.i("vdknvkd", "vıjıwf");
|
||||
}
|
||||
|
||||
private void onCountryDropdownClicked(View view){
|
||||
Log.i("vdknvkd", "vıjıwf");
|
||||
}
|
||||
|
||||
private void showZoneDialog(){
|
||||
|
||||
final ArrayList<String> zoneNameList = new ArrayList<>();
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.text.Editable;
|
||||
import android.text.InputType;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
@@ -22,25 +23,13 @@ import ch.pizzalink.android.helper.PasswordHelper;
|
||||
* Created by cimenmus on 23.10.2017.
|
||||
*/
|
||||
|
||||
public class PizzalinkDropdown extends LinearLayout implements View.OnClickListener {
|
||||
public class PizzalinkDropdown extends LinearLayout{
|
||||
|
||||
private View rootView;
|
||||
private TextView hintTextView;
|
||||
private EditText editText;
|
||||
private TextView textview;
|
||||
private Typeface typeFace;
|
||||
private String hint;
|
||||
private OnClickListener onClickListener;
|
||||
|
||||
/*
|
||||
public PizzalinkDropdown(LinearLayout rootView, boolean isLeftIconVisible, int leftIconId,
|
||||
int editTextHintId, int inputType, boolean isPasswordIconVisible){
|
||||
|
||||
initViews(rootView);
|
||||
setLeftIcon(isLeftIconVisible, leftIconId);
|
||||
setPasswordIcon(isPasswordIconVisible);
|
||||
setEditTextt(editTextHintId, inputType);
|
||||
}
|
||||
*/
|
||||
|
||||
public PizzalinkDropdown(Context context) {
|
||||
super(context);
|
||||
@@ -61,34 +50,9 @@ public class PizzalinkDropdown extends LinearLayout implements View.OnClickListe
|
||||
private void init(Context context) {
|
||||
rootView = (View) inflate(context, R.layout.layout_pizzalink_dropdown, this);
|
||||
hintTextView = (TextView) rootView.findViewById(R.id.hintTextView);
|
||||
editText = (EditText) rootView.findViewById(R.id.editText);
|
||||
textview = (TextView) rootView.findViewById(R.id.textview);
|
||||
rootView.setClickable(true);
|
||||
hintTextView.setText(hint);
|
||||
rootView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(onClickListener != null){
|
||||
onClickListener.onClick(rootView);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.setClickable(true);
|
||||
|
||||
this.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(onClickListener != null){
|
||||
onClickListener.onClick(rootView);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void setOnClickListener(OnClickListener onClickListener){
|
||||
this.onClickListener = onClickListener;
|
||||
}
|
||||
|
||||
public boolean isEmpty(){
|
||||
@@ -100,13 +64,14 @@ public class PizzalinkDropdown extends LinearLayout implements View.OnClickListe
|
||||
}
|
||||
|
||||
public void setText(String text){
|
||||
editText.setText(text);
|
||||
textview.setText(text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(onClickListener != null){
|
||||
onClickListener.onClick(rootView);
|
||||
}
|
||||
private void onZoneDropdownClicked(View view){
|
||||
Log.i("vdknvkd", "vıjıwf");
|
||||
}
|
||||
|
||||
private void onCountryDropdownClicked(View view){
|
||||
Log.i("vdknvkd", "vıjıwf");
|
||||
}
|
||||
}
|
||||
@@ -30,8 +30,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white"
|
||||
tools:context="ch.pizzalink.android.activity.LoginActivity">
|
||||
android:background="@color/white">
|
||||
|
||||
<ch.pizzalink.android.view.PizzalinkEditText
|
||||
android:id="@+id/firstnamePizzalinkEditText"
|
||||
@@ -93,7 +92,8 @@
|
||||
android:id="@+id/zonePizzalinkDropdown"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:dropdownHint="@string/zone"/>
|
||||
app:dropdownHint="@string/zone"
|
||||
android:onClick="onZoneDropdownClicked"/>
|
||||
|
||||
<ch.pizzalink.android.view.PizzalinkDropdown
|
||||
android:id="@+id/postcodePizzalinkDrowpdown"
|
||||
@@ -105,7 +105,8 @@
|
||||
android:id="@+id/countryPizzalinkDropdown"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:dropdownHint="@string/country"/>
|
||||
app:dropdownHint="@string/country"
|
||||
android:onClick="onCountryDropdownClicked"/>
|
||||
|
||||
<android.support.v4.widget.Space
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingRight="24dp"
|
||||
android:paddingEnd="24dp"
|
||||
android:clickable="true">
|
||||
android:paddingEnd="24dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/hintTextView"
|
||||
@@ -22,8 +21,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText"
|
||||
<TextView
|
||||
android:id="@+id/textview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
@@ -31,12 +30,7 @@
|
||||
android:textColorHint="@color/row_product_ingredients_background"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clickable="false"
|
||||
android:cursorVisible="false"
|
||||
android:editable="false"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"/>
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user