Zaimplementowane wszystkie aktywności
This commit is contained in:
parent
3d3d2ffb23
commit
8c94cfe3aa
@ -9,7 +9,10 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.PizzujemyV3">
|
||||
<activity android:name=".CollectFormActivity"></activity>
|
||||
<activity android:name=".CollectFormActivityTC"></activity>
|
||||
<activity android:name=".DeliveryFormActivityTC" />
|
||||
<activity android:name=".CheckoutActivity" />
|
||||
<activity android:name=".CollectFormActivity" />
|
||||
<activity android:name=".DeliveryFormActivity" />
|
||||
<activity android:name=".CartActivity" />
|
||||
<activity android:name=".Menu" />
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.example.pizzujemyv3;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
@ -14,7 +16,7 @@ import java.util.ArrayList;
|
||||
|
||||
public class CartActivity extends AppCompatActivity {
|
||||
ListView cLView;
|
||||
ArrayList<Pizza> menuArrayList = new ArrayList<>();
|
||||
ArrayList<Pizza> menuArrayList;
|
||||
Switch oSwitch;
|
||||
Button oButton;
|
||||
@Override
|
||||
@ -24,39 +26,40 @@ Button oButton;
|
||||
cLView = findViewById(R.id.cartListView);
|
||||
|
||||
ArrayList<Pizza> cartArrayList = new ArrayList<>();
|
||||
//cartArrayList.add(pizzaArrayList.get(1));
|
||||
//cartArrayList.add(pizzaArrayList.get(3));
|
||||
menuArrayList = getIntent().getParcelableArrayListExtra("pizzas");
|
||||
Cart cart= new Cart(menuArrayList);
|
||||
|
||||
UserInfo user = getIntent().getParcelableExtra("user");
|
||||
menuArrayList = getIntent().getParcelableArrayListExtra("pizzas");
|
||||
Cart cart= new Cart(menuArrayList);
|
||||
|
||||
TextView totalPrice = (TextView)findViewById(R.id.totalPrice);
|
||||
totalPrice.setText("Cena: " + cart.getStringTotalPrice());
|
||||
|
||||
PizzaAdapter pizzaAdapter = new PizzaAdapter(this,R.layout.list_row,cart.cartLista);
|
||||
cLView.setAdapter(pizzaAdapter);
|
||||
/*
|
||||
cartListView = findViewById(R.id.listView);
|
||||
pizzaArrayList = new ArrayList<>();
|
||||
pizzaArrayList = getIntent().getParcelableArrayListExtra("pizzas");
|
||||
PizzaAdapter pizzaAdapter = new PizzaAdapter(this,R.layout.list_row,pizzaArrayList);
|
||||
cartListView.setAdapter(pizzaAdapter);
|
||||
*/
|
||||
/* cartListView = findViewById(R.id.cartListView);
|
||||
ArrayList<Pizza> pizzaArrayList = new ArrayList<>();
|
||||
pizzaArrayList = getIntent().getParcelableArrayListExtra("pizzas");
|
||||
|
||||
|
||||
Cart cart = new Cart(pizzaArrayList);
|
||||
PizzaAdapter pizzaAdapter = new PizzaAdapter(this,R.layout.cart_list_row,cart.cartLista);
|
||||
cartListView.setAdapter(pizzaAdapter);*/
|
||||
|
||||
oSwitch = findViewById(R.id.dowozSwitch);
|
||||
oButton = findViewById(R.id.zamow);
|
||||
oButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(oSwitch.isChecked());
|
||||
|
||||
if(user.getName().isEmpty())
|
||||
{
|
||||
Toast.makeText(getApplicationContext(),"Szacowany czas oczekiwania: 50 minut", Toast.LENGTH_SHORT);
|
||||
if(oSwitch.isChecked()){
|
||||
Intent intent = new Intent(CartActivity.this, DeliveryFormActivityTC.class);
|
||||
intent.putParcelableArrayListExtra("cartpizzas",cart.cartLista);
|
||||
startActivity(intent);
|
||||
}
|
||||
else {
|
||||
Intent intent = new Intent(CartActivity.this, CollectFormActivityTC.class);
|
||||
intent.putParcelableArrayListExtra("cartpizzas",cart.cartLista);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Intent intent = new Intent(CartActivity.this, CheckoutActivity.class);
|
||||
intent.putExtra("user",user);
|
||||
intent.putParcelableArrayListExtra("cartpizzas",cart.cartLista);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -31,51 +31,18 @@ public class CartAdapter extends ArrayAdapter<Pizza> {
|
||||
|
||||
convertView = layoutInflater.inflate(mResource,parent,false);
|
||||
|
||||
TextView txtSumPrice = convertView.findViewById(R.id.sumTxtPrice);
|
||||
|
||||
TextView addCounter = convertView.findViewById(R.id.addCounter);
|
||||
|
||||
TextView txtName = convertView.findViewById(R.id.txtName);
|
||||
TextView txtPrice = convertView.findViewById(R.id.txtPrice);
|
||||
TextView txtSumPrice = convertView.findViewById(R.id.sumTxtPrice);
|
||||
ImageView imageView = convertView.findViewById(R.id.image);
|
||||
|
||||
TextView txtName = convertView.findViewById(R.id.txtName);
|
||||
|
||||
TextView txtPrice = convertView.findViewById(R.id.txtPrice);
|
||||
|
||||
TextView txtContent = convertView.findViewById(R.id.txtContent);
|
||||
|
||||
Button minButton = convertView.findViewById(R.id.minButton);
|
||||
|
||||
Button addButton = convertView.findViewById(R.id.addButton);
|
||||
|
||||
imageView.setImageResource(getItem(position).getResID());
|
||||
addCounter.setText((getItem(position).getStringOnOrder()));
|
||||
|
||||
addCounter.setText("x" +(getItem(position).getStringOnOrder()));
|
||||
txtName.setText(getItem(position).getName());
|
||||
|
||||
txtSumPrice.setText(getItem(position).getStringSumPrice());
|
||||
|
||||
txtPrice.setText(getItem(position).getStringPrice());
|
||||
|
||||
txtContent.setText(getItem(position).getDes());
|
||||
|
||||
minButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
getItem(position).minOnOrder();
|
||||
addCounter.setText(((getItem(position).getStringOnOrder())));
|
||||
}
|
||||
});
|
||||
addButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
||||
|
||||
public void onClick(View v) {
|
||||
Toast.makeText(getContext(), "Dodano do koszyka!", Toast.LENGTH_SHORT).show();
|
||||
getItem(position).addOnOrder();
|
||||
addCounter.setText((getItem(position).getStringOnOrder()));
|
||||
}
|
||||
});
|
||||
|
||||
txtSumPrice.setText( getItem(position).getStringSumPrice());
|
||||
|
||||
return convertView;
|
||||
}
|
||||
|
@ -0,0 +1,53 @@
|
||||
package com.example.pizzujemyv3;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class CheckoutActivity extends AppCompatActivity {
|
||||
|
||||
ListView cLView;
|
||||
ArrayList<Pizza> cartArrayList = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_checkout);
|
||||
cLView = findViewById(R.id.cartListView);
|
||||
|
||||
UserInfo user = getIntent().getParcelableExtra("user");
|
||||
cartArrayList = getIntent().getParcelableArrayListExtra("cartpizzas");
|
||||
|
||||
Cart checkoutCart = new Cart(cartArrayList);
|
||||
|
||||
TextView userInfo = findViewById(R.id.userInfoOnCheckout);
|
||||
TextView totalPrice = findViewById(R.id.totalPriceOnCheckout);
|
||||
|
||||
String buffer = user.toCheckout();
|
||||
userInfo.setText(buffer);
|
||||
totalPrice.setText(checkoutCart.getStringTotalPrice());
|
||||
|
||||
CartAdapter cartAdapter = new CartAdapter(this,R.layout.cart_list_row,cartArrayList);
|
||||
cLView.setAdapter(cartAdapter);
|
||||
|
||||
Button zamowButton = findViewById(R.id.cart);
|
||||
|
||||
zamowButton.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
|
||||
|
||||
Toast.makeText(getApplicationContext(),"Zamówienie zostało przyjęte! Smacznego!", Toast.LENGTH_LONG).show();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
@ -13,6 +13,8 @@ import com.basgeekball.awesomevalidation.AwesomeValidation;
|
||||
import com.basgeekball.awesomevalidation.ValidationStyle;
|
||||
import com.basgeekball.awesomevalidation.utility.RegexTemplate;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class CollectFormActivity extends AppCompatActivity {
|
||||
|
||||
EditText tUserName, tUserNameS, tPhoneNumber;
|
||||
@ -22,29 +24,32 @@ public class CollectFormActivity extends AppCompatActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_collect_form);
|
||||
tUserName = findViewById(R.id.txtUserName);
|
||||
tUserNameS = findViewById(R.id.txtUserNameS);
|
||||
tPhoneNumber = findViewById(R.id.txtPhoneNumber);
|
||||
|
||||
tUserName = (EditText) findViewById(R.id.txtUserName);
|
||||
tUserNameS = (EditText) findViewById(R.id.txtUserNameS);
|
||||
tPhoneNumber = (EditText) findViewById(R.id.txtPhoneNumber);
|
||||
zamowButton = findViewById((R.id.Confirm));
|
||||
|
||||
awesomeValidation = new AwesomeValidation(ValidationStyle.BASIC);
|
||||
|
||||
awesomeValidation.addValidation(this,R.id.txtUserName, RegexTemplate.NOT_EMPTY,R.string.invalid_name);
|
||||
|
||||
awesomeValidation.addValidation(this,R.id.txtUserNameS, RegexTemplate.NOT_EMPTY,R.string.invalid_nameS);
|
||||
awesomeValidation.addValidation(this,R.id.txtPhoneNumber, "[2-9]{1}[0-9]{8}$",R.string.invalid_number);
|
||||
|
||||
awesomeValidation.addValidation(this,R.id.txtPhoneNumber, "[5-9]{1}[0-9]{9}$",R.string.invalid_number);
|
||||
|
||||
zamowButton.setOnClickListener(new View.OnClickListener()
|
||||
UserInfo user = new UserInfo(tUserName.getText().toString(), tUserNameS.getText().toString(), tPhoneNumber.getText().toString());
|
||||
zamowButton.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (awesomeValidation.validate()){
|
||||
Intent intent = new Intent(CollectFormActivity.this, Menu.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
UserInfo user = new UserInfo(tUserName.getText().toString(), tUserNameS.getText().toString(), tPhoneNumber.getText().toString());
|
||||
Intent intent = new Intent(CollectFormActivity.this, Menu.class);
|
||||
intent.putExtra("user",user);
|
||||
startActivity(intent);
|
||||
}
|
||||
else{
|
||||
Toast.makeText(getApplicationContext(),"Wprowadź dane poprawnie", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -0,0 +1,59 @@
|
||||
package com.example.pizzujemyv3;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.basgeekball.awesomevalidation.AwesomeValidation;
|
||||
import com.basgeekball.awesomevalidation.ValidationStyle;
|
||||
import com.basgeekball.awesomevalidation.utility.RegexTemplate;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class CollectFormActivityTC extends AppCompatActivity {
|
||||
|
||||
EditText tUserName, tUserNameS, tPhoneNumber;
|
||||
Button zamowButton;
|
||||
ArrayList<Pizza> cartList = new ArrayList<Pizza>();
|
||||
AwesomeValidation awesomeValidation;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_collect_form_t_c);
|
||||
|
||||
cartList = getIntent().getParcelableArrayListExtra("cartpizzas");
|
||||
tUserName = findViewById(R.id.txtUserName);
|
||||
tUserNameS = findViewById(R.id.txtUserNameS);
|
||||
tPhoneNumber = findViewById(R.id.txtPhoneNumber);
|
||||
zamowButton = findViewById((R.id.Confirm));
|
||||
|
||||
awesomeValidation = new AwesomeValidation(ValidationStyle.BASIC);
|
||||
awesomeValidation.addValidation(this,R.id.txtUserName, RegexTemplate.NOT_EMPTY,R.string.invalid_name);
|
||||
awesomeValidation.addValidation(this,R.id.txtUserNameS, RegexTemplate.NOT_EMPTY,R.string.invalid_nameS);
|
||||
awesomeValidation.addValidation(this,R.id.txtPhoneNumber, "[2-9]{1}[0-9]{8}$",R.string.invalid_number);
|
||||
|
||||
|
||||
zamowButton.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (awesomeValidation.validate()){
|
||||
UserInfo user = new UserInfo(tUserName.getText().toString(), tUserNameS.getText().toString(), tPhoneNumber.getText().toString());
|
||||
|
||||
Intent intent = new Intent(CollectFormActivityTC.this, CheckoutActivity.class);
|
||||
intent.putParcelableArrayListExtra("cartpizzas",cartList);
|
||||
intent.putExtra("user",user);
|
||||
startActivity(intent);
|
||||
}
|
||||
else{
|
||||
Toast.makeText(getApplicationContext(),"Wprowadź dane poprawnie", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -13,43 +13,50 @@ import com.basgeekball.awesomevalidation.AwesomeValidation;
|
||||
import com.basgeekball.awesomevalidation.ValidationStyle;
|
||||
import com.basgeekball.awesomevalidation.utility.RegexTemplate;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class DeliveryFormActivity extends AppCompatActivity {
|
||||
|
||||
EditText tUserName, tUserNameS, tPhoneNumber, tCity, tStreet, tStreetNumber;
|
||||
Button zamowButton;
|
||||
ArrayList<Pizza> cartList = new ArrayList<Pizza>();
|
||||
AwesomeValidation awesomeValidation;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_collect_form);
|
||||
tUserName = findViewById(R.id.txtUserName);
|
||||
tUserNameS = findViewById(R.id.txtUserNameS);
|
||||
tPhoneNumber = findViewById(R.id.txtPhoneNumber);
|
||||
tCity = findViewById(R.id.txtCity);
|
||||
tStreet = findViewById(R.id.txtStreet);
|
||||
tStreetNumber = findViewById(R.id.txtStreetNumber);
|
||||
zamowButton = findViewById((R.id.Confirm));
|
||||
setContentView(R.layout.activity_delivery_form);
|
||||
|
||||
tUserName = (EditText)findViewById(R.id.txtUserName);
|
||||
tUserNameS = (EditText)findViewById(R.id.txtUserNameS);
|
||||
tPhoneNumber = (EditText)findViewById(R.id.txtPhoneNumber);
|
||||
tCity = (EditText)findViewById(R.id.txtCity);
|
||||
tStreet = (EditText)findViewById(R.id.txtStreet);
|
||||
tStreetNumber = (EditText)findViewById(R.id.txtStreetNumber);
|
||||
|
||||
awesomeValidation = new AwesomeValidation(ValidationStyle.BASIC);
|
||||
|
||||
awesomeValidation.addValidation(this,R.id.txtUserName, RegexTemplate.NOT_EMPTY,R.string.invalid_name);
|
||||
|
||||
awesomeValidation.addValidation(this,R.id.txtUserNameS, RegexTemplate.NOT_EMPTY,R.string.invalid_nameS);
|
||||
|
||||
awesomeValidation.addValidation(this,R.id.txtPhoneNumber, "[5-9]{1}[0-9]{9}$",R.string.invalid_number);
|
||||
awesomeValidation.addValidation(this,R.id.txtPhoneNumber, "[3-9]{1}[0-9]{8}$",R.string.invalid_number);
|
||||
|
||||
awesomeValidation.addValidation(this,R.id.txtCity, RegexTemplate.NOT_EMPTY,R.string.invalid_nameS);
|
||||
awesomeValidation.addValidation(this,R.id.txtStreet, RegexTemplate.NOT_EMPTY,R.string.invalid_nameS);
|
||||
awesomeValidation.addValidation(this,R.id.txtStreetNumber, RegexTemplate.NOT_EMPTY,R.string.invalid_nameS);
|
||||
|
||||
|
||||
zamowButton = findViewById((R.id.Confirm));
|
||||
|
||||
|
||||
zamowButton.setOnClickListener(new View.OnClickListener()
|
||||
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (awesomeValidation.validate()){
|
||||
UserInfo user = new UserInfo(tUserName.getText().toString(), tUserNameS.getText().toString(), tPhoneNumber.getText().toString(), tCity.getText().toString(), tStreet.getText().toString(), tStreetNumber.getText().toString());
|
||||
|
||||
Intent intent = new Intent(DeliveryFormActivity.this, Menu.class);
|
||||
startActivity(intent);
|
||||
intent.putExtra("user",user);
|
||||
startActivity(intent);
|
||||
}
|
||||
else{
|
||||
Toast.makeText(getApplicationContext(),"Wprowadź dane poprawnie", Toast.LENGTH_LONG).show();
|
||||
|
@ -0,0 +1,70 @@
|
||||
package com.example.pizzujemyv3;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.basgeekball.awesomevalidation.AwesomeValidation;
|
||||
import com.basgeekball.awesomevalidation.ValidationStyle;
|
||||
import com.basgeekball.awesomevalidation.utility.RegexTemplate;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class DeliveryFormActivityTC extends AppCompatActivity {
|
||||
|
||||
EditText tUserName, tUserNameS, tPhoneNumber, tCity, tStreet, tStreetNumber;
|
||||
Button zamowButton;
|
||||
ArrayList<Pizza> cartList = new ArrayList<Pizza>();
|
||||
AwesomeValidation awesomeValidation;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_delivery_form_t_c);
|
||||
|
||||
cartList = getIntent().getParcelableArrayListExtra("cartpizzas");
|
||||
|
||||
tUserName = (EditText)findViewById(R.id.txtUserName);
|
||||
tUserNameS = (EditText)findViewById(R.id.txtUserNameS);
|
||||
tPhoneNumber = (EditText)findViewById(R.id.txtPhoneNumber);
|
||||
tCity = (EditText)findViewById(R.id.txtCity);
|
||||
tStreet = (EditText)findViewById(R.id.txtStreet);
|
||||
tStreetNumber = (EditText)findViewById(R.id.txtStreetNumber);
|
||||
|
||||
awesomeValidation = new AwesomeValidation(ValidationStyle.BASIC);
|
||||
awesomeValidation.addValidation(this,R.id.txtUserName, RegexTemplate.NOT_EMPTY,R.string.invalid_name);
|
||||
awesomeValidation.addValidation(this,R.id.txtUserNameS, RegexTemplate.NOT_EMPTY,R.string.invalid_nameS);
|
||||
awesomeValidation.addValidation(this,R.id.txtPhoneNumber, "[3-9]{1}[0-9]{8}$",R.string.invalid_number);
|
||||
|
||||
awesomeValidation.addValidation(this,R.id.txtCity, RegexTemplate.NOT_EMPTY,R.string.invalid_nameS);
|
||||
awesomeValidation.addValidation(this,R.id.txtStreet, RegexTemplate.NOT_EMPTY,R.string.invalid_nameS);
|
||||
awesomeValidation.addValidation(this,R.id.txtStreetNumber, RegexTemplate.NOT_EMPTY,R.string.invalid_nameS);
|
||||
|
||||
|
||||
zamowButton = findViewById((R.id.Confirm));
|
||||
|
||||
|
||||
zamowButton.setOnClickListener(new View.OnClickListener()
|
||||
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (awesomeValidation.validate()){
|
||||
UserInfo user = new UserInfo(tUserName.getText().toString(), tUserNameS.getText().toString(), tPhoneNumber.getText().toString(), tCity.getText().toString(), tStreet.getText().toString(), tStreetNumber.getText().toString());
|
||||
|
||||
Intent intent = new Intent(DeliveryFormActivityTC.this, CheckoutActivity.class);
|
||||
intent.putParcelableArrayListExtra("cartpizzas",cartList);
|
||||
intent.putExtra("user",user);
|
||||
startActivity(intent);
|
||||
}
|
||||
else{
|
||||
Toast.makeText(getApplicationContext(),"Wprowadź dane poprawnie", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -14,11 +14,14 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
UserInfo initialUser = new UserInfo();
|
||||
|
||||
menuButton = findViewById(R.id.menuButton);
|
||||
menuButton.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
|
||||
Intent intent = new Intent(MainActivity.this, Menu.class);
|
||||
intent.putExtra("user",initialUser);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,9 @@ public class Menu extends AppCompatActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_menu);
|
||||
|
||||
|
||||
UserInfo user = getIntent().getParcelableExtra("user");
|
||||
|
||||
menuListView = findViewById(R.id.listView);
|
||||
ArrayList<Pizza> arrayList = new ArrayList<>();
|
||||
|
||||
@ -38,7 +41,8 @@ public class Menu extends AppCompatActivity {
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(Menu.this, CartActivity.class);
|
||||
intent.putParcelableArrayListExtra("pizzas",arrayList);
|
||||
intent.putExtra("user",user);
|
||||
startActivity(intent);
|
||||
};
|
||||
}
|
||||
});
|
||||
}}
|
||||
|
@ -32,6 +32,8 @@ public class PizzaAdapter extends ArrayAdapter<Pizza> {
|
||||
|
||||
convertView = layoutInflater.inflate(mResource,parent,false);
|
||||
|
||||
|
||||
|
||||
TextView txtSumPrice = convertView.findViewById(R.id.sumTxtPrice);
|
||||
|
||||
TextView addCounter = convertView.findViewById(R.id.addCounter);
|
||||
@ -64,6 +66,8 @@ public class PizzaAdapter extends ArrayAdapter<Pizza> {
|
||||
public void onClick(View v) {
|
||||
getItem(position).minOnOrder();
|
||||
addCounter.setText(((getItem(position).getStringOnOrder())));
|
||||
txtSumPrice.setText(getItem(position).getStringSumPrice());
|
||||
|
||||
}
|
||||
});
|
||||
addButton.setOnClickListener(new View.OnClickListener() {
|
||||
@ -74,6 +78,8 @@ public class PizzaAdapter extends ArrayAdapter<Pizza> {
|
||||
Toast.makeText(getContext(), "Dodano do koszyka!", Toast.LENGTH_SHORT).show();
|
||||
getItem(position).addOnOrder();
|
||||
addCounter.setText((getItem(position).getStringOnOrder()));
|
||||
txtSumPrice.setText(getItem(position).getStringSumPrice());
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
160
app/src/main/java/com/example/pizzujemyv3/UserInfo.java
Normal file
160
app/src/main/java/com/example/pizzujemyv3/UserInfo.java
Normal file
@ -0,0 +1,160 @@
|
||||
package com.example.pizzujemyv3;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class UserInfo implements Parcelable {
|
||||
private String name;
|
||||
private String nameS;
|
||||
private String phone;
|
||||
private String city;
|
||||
private String street;
|
||||
private String streetNumber;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UserInfo{" +
|
||||
"name='" + name + '\'' +
|
||||
", nameS='" + nameS + '\'' +
|
||||
", phone='" + phone + '\'' +
|
||||
", city='" + city + '\'' +
|
||||
", street='" + street + '\'' +
|
||||
", streetNumber='" + streetNumber + '\'' +
|
||||
'}';
|
||||
}
|
||||
UserInfo(String name, String nameS, String phone, String city, String street, String streetNumber){
|
||||
this.name = name;
|
||||
this.nameS = nameS;
|
||||
this.phone = phone;
|
||||
this.city = city;
|
||||
this.street = street;
|
||||
this.streetNumber = streetNumber;
|
||||
}
|
||||
UserInfo(String name, String nameS, String phone){
|
||||
this.name = name;
|
||||
this.nameS = nameS;
|
||||
this.phone = phone;
|
||||
this.city = "";
|
||||
this.street = "";
|
||||
this.streetNumber ="";
|
||||
}
|
||||
UserInfo(){
|
||||
this.name = "";
|
||||
this.nameS = "";
|
||||
this.phone = "";
|
||||
this.city = "";
|
||||
this.street = "";
|
||||
this.streetNumber ="";
|
||||
}
|
||||
|
||||
UserInfo(UserInfo user)
|
||||
{
|
||||
this.name = user.getName();
|
||||
this.nameS = user.getNameS();
|
||||
this.phone = user.getPhone();
|
||||
this.city = user.getCity();
|
||||
this.street = user.getStreet();
|
||||
this.streetNumber = user.getStreetNumber();
|
||||
}
|
||||
|
||||
public String toCheckout()
|
||||
{
|
||||
if(this.city == "") {
|
||||
return name + " " + nameS + "\n" +phone;
|
||||
}
|
||||
else {
|
||||
return this.name + " " + this.nameS + "\n" + this.phone + "\n" + this.city + " " + this.street + " " + this.streetNumber;
|
||||
}
|
||||
}
|
||||
|
||||
protected UserInfo(Parcel in) {
|
||||
name = in.readString();
|
||||
nameS = in.readString();
|
||||
phone = in.readString();
|
||||
city = in.readString();
|
||||
street = in.readString();
|
||||
streetNumber = in.readString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeString(name);
|
||||
dest.writeString(nameS);
|
||||
dest.writeString(phone);
|
||||
dest.writeString(city);
|
||||
dest.writeString(street);
|
||||
dest.writeString(streetNumber);
|
||||
}
|
||||
protected boolean isUserEntered(){
|
||||
if(name.isEmpty()){return false;}
|
||||
else{return true;}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static final Creator<UserInfo> CREATOR = new Creator<UserInfo>() {
|
||||
@Override
|
||||
public UserInfo createFromParcel(Parcel in) {
|
||||
return new UserInfo(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserInfo[] newArray(int size) {
|
||||
return new UserInfo[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getNameS() {
|
||||
return nameS;
|
||||
}
|
||||
|
||||
public void setNameS(String nameS) {
|
||||
this.nameS = nameS;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getStreet() {
|
||||
return street;
|
||||
}
|
||||
|
||||
public void setStreet(String street) {
|
||||
this.street = street;
|
||||
}
|
||||
|
||||
public String getStreetNumber() {
|
||||
return streetNumber;
|
||||
}
|
||||
|
||||
public void setStreetNumber(String streetNumber) {
|
||||
this.streetNumber = streetNumber;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -70,7 +70,7 @@
|
||||
>
|
||||
|
||||
<Switch
|
||||
android:id="@+id/dowoz"
|
||||
android:id="@+id/dowozSwitch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="5dp"
|
||||
|
124
app/src/main/res/layout/activity_checkout.xml
Normal file
124
app/src/main/res/layout/activity_checkout.xml
Normal file
@ -0,0 +1,124 @@
|
||||
<?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="@drawable/decha"
|
||||
tools:context=".CheckoutActivity"
|
||||
android:orientation="vertical"
|
||||
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="15sp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/logo"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="50dp"
|
||||
android:layout_weight="0.95"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginBottom="10sp"
|
||||
android:layout_weight="0.3"
|
||||
>
|
||||
<ListView
|
||||
android:id="@+id/cartListView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor = "#ffffff"
|
||||
android:divider="#000000"
|
||||
android:dividerHeight="2dp"
|
||||
android:layout_weight="0.2"
|
||||
>
|
||||
</ListView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#20FFFFFF"
|
||||
android:textColor="@color/white"
|
||||
android:shadowColor="#55000000"
|
||||
android:shadowDx="6"
|
||||
android:shadowDy="6"
|
||||
android:shadowRadius="6"
|
||||
android:id="@+id/userInfoOnCheckout"
|
||||
android:textAlignment="center"
|
||||
android:textSize="15sp"
|
||||
android:layout_marginTop="10sp"
|
||||
></TextView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#20FFFFFF"
|
||||
android:textColor="@color/white"
|
||||
android:shadowColor="#55000000"
|
||||
android:shadowDx="6"
|
||||
android:shadowDy="6"
|
||||
android:shadowRadius="6"
|
||||
android:id="@+id/totalPriceOnCheckout"
|
||||
android:textAlignment="center"
|
||||
android:textSize="20sp"
|
||||
android:singleLine="true"
|
||||
android:layout_marginTop="10sp"
|
||||
></TextView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
|
||||
<Switch
|
||||
android:id="@+id/dowoz"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight="0.7"
|
||||
android:background="#20FFFFFF"
|
||||
android:shadowColor="#55000000"
|
||||
android:shadowDx="6"
|
||||
android:shadowDy="6"
|
||||
android:shadowRadius="6"
|
||||
android:text="Dowóz"
|
||||
android:textAlignment="center"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp"
|
||||
app:backgroundTint="@null"
|
||||
android:checked="true"/>
|
||||
<Button
|
||||
android:id="@+id/zamow"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.3"
|
||||
android:text="@string/zamow"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="20sp"
|
||||
app:backgroundTint="@null"
|
||||
android:background="#20FFFFFF"
|
||||
android:textColor="@color/white"
|
||||
android:shadowColor="#55000000"
|
||||
android:shadowDx="6"
|
||||
android:shadowDy="6"
|
||||
android:shadowRadius="6"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
126
app/src/main/res/layout/activity_collect_form_t_c.xml
Normal file
126
app/src/main/res/layout/activity_collect_form_t_c.xml
Normal file
@ -0,0 +1,126 @@
|
||||
<?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"
|
||||
tools:context=".DeliveryFormActivityTC"
|
||||
android:background="@drawable/decha"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="20sp"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="0.8"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/logo"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="20sp"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="0.2"
|
||||
>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtUserName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="#20FFFFFF"
|
||||
android:hint="@string/imię"
|
||||
android:inputType="text"
|
||||
android:shadowColor="#55000000"
|
||||
android:shadowDx="6"
|
||||
android:shadowDy="6"
|
||||
android:shadowRadius="6"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="#55FFFFFF"
|
||||
android:textSize="30sp"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"></EditText>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtUserNameS"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="#20FFFFFF"
|
||||
android:hint="@string/nazwisko"
|
||||
android:inputType="text"
|
||||
android:shadowColor="#55000000"
|
||||
android:shadowDx="6"
|
||||
android:shadowDy="6"
|
||||
android:shadowRadius="6"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="#55FFFFFF"
|
||||
android:textSize="30sp"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/txtUserName"></EditText>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtPhoneNumber"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="#20FFFFFF"
|
||||
android:hint="@string/telefon"
|
||||
android:inputType="phone"
|
||||
android:shadowColor="#55000000"
|
||||
android:shadowDx="6"
|
||||
android:shadowDy="6"
|
||||
android:shadowRadius="6"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="#55FFFFFF"
|
||||
android:textSize="30sp"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtUserNameS"></EditText>
|
||||
|
||||
<Button
|
||||
android:id="@+id/Confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="#10FFFFFF"
|
||||
android:shadowColor="#55000000"
|
||||
android:shadowDx="6"
|
||||
android:shadowDy="6"
|
||||
android:shadowRadius="6"
|
||||
android:text="@string/zamow"
|
||||
android:textAlignment="center"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="50sp"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
190
app/src/main/res/layout/activity_delivery_form_t_c.xml
Normal file
190
app/src/main/res/layout/activity_delivery_form_t_c.xml
Normal file
@ -0,0 +1,190 @@
|
||||
<?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"
|
||||
tools:context=".DeliveryFormActivityTC"
|
||||
android:background="@drawable/decha"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="20sp"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="0.8"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/logo"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="20sp"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="0.2"
|
||||
>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtUserName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="#20FFFFFF"
|
||||
android:hint="@string/imię"
|
||||
android:inputType="text"
|
||||
android:shadowColor="#55000000"
|
||||
android:shadowDx="6"
|
||||
android:shadowDy="6"
|
||||
android:shadowRadius="6"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="#55FFFFFF"
|
||||
android:textSize="30sp"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"></EditText>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtUserNameS"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="#20FFFFFF"
|
||||
android:hint="@string/nazwisko"
|
||||
android:inputType="text"
|
||||
android:shadowColor="#55000000"
|
||||
android:shadowDx="6"
|
||||
android:shadowDy="6"
|
||||
android:shadowRadius="6"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="#55FFFFFF"
|
||||
android:textSize="30sp"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/txtUserName"></EditText>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtPhoneNumber"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="#20FFFFFF"
|
||||
android:hint="@string/telefon"
|
||||
android:inputType="phone"
|
||||
android:shadowColor="#55000000"
|
||||
android:shadowDx="6"
|
||||
android:shadowDy="6"
|
||||
android:shadowRadius="6"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="#55FFFFFF"
|
||||
android:textSize="30sp"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtUserNameS"></EditText>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtCity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="#20FFFFFF"
|
||||
android:hint="@string/miasto"
|
||||
android:inputType="text"
|
||||
android:shadowColor="#55000000"
|
||||
android:shadowDx="6"
|
||||
android:shadowDy="6"
|
||||
android:shadowRadius="6"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="#55FFFFFF"
|
||||
android:textSize="30sp"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/txtPhoneNumber"></EditText>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtStreet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="#20FFFFFF"
|
||||
android:hint="@string/ulica"
|
||||
android:inputType="text"
|
||||
android:shadowColor="#55000000"
|
||||
android:shadowDx="6"
|
||||
android:shadowDy="6"
|
||||
android:shadowRadius="6"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="#55FFFFFF"
|
||||
android:textSize="30sp"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/txtCity"></EditText>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtStreetNumber"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="#20FFFFFF"
|
||||
android:hint="@string/numerDomu"
|
||||
android:inputType="text"
|
||||
android:shadowColor="#55000000"
|
||||
android:shadowDx="6"
|
||||
android:shadowDy="6"
|
||||
android:shadowRadius="6"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="#55FFFFFF"
|
||||
android:textSize="30sp"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/txtStreet"></EditText>
|
||||
|
||||
<Button
|
||||
android:id="@+id/Confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="#10FFFFFF"
|
||||
android:shadowColor="#55000000"
|
||||
android:shadowDx="6"
|
||||
android:shadowDy="6"
|
||||
android:shadowRadius="6"
|
||||
android:text="@string/zamow"
|
||||
android:textAlignment="center"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/white"
|
||||
|
||||
android:textSize="50sp"
|
||||
app:backgroundTint="@null"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -6,12 +6,12 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="#20FFFFFF"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:src="?attr/colorAccent"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
/>
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="?attr/colorAccent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtName"
|
||||
@ -42,63 +42,30 @@
|
||||
android:shadowDx="6"
|
||||
android:shadowDy="6"
|
||||
android:shadowRadius="6" />
|
||||
<TextView
|
||||
android:id="@+id/txtContent"
|
||||
android:layout_toRightOf="@+id/image"
|
||||
android:layout_below="@+id/txtName"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
style="@style/TextAppearance.AppCompat.Subhead"
|
||||
android:text="Squad"
|
||||
android:textColor="@color/white"
|
||||
android:shadowColor="#55000000"
|
||||
android:shadowDx="6"
|
||||
android:shadowDy="6"
|
||||
android:shadowRadius="6"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/addCounter"
|
||||
style="@style/TextAppearance.AppCompat.Subhead"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/addButton"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_below="@id/txtContent"
|
||||
|
||||
android:layout_toRightOf="@id/txtPrice"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/addButton"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_toRightOf="@id/image"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_below="@id/txtContent"
|
||||
android:background="@drawable/ic_add" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/minButton"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_below="@id/txtContent"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_toRightOf="@id/addCounter"
|
||||
android:background="@drawable/ic_minus" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/addCounter"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_toRightOf="@id/image"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_toRightOf="@id/addCounter"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:id="@+id/sumTxtPrice"
|
||||
android:text="0"
|
||||
|
||||
android:textColor="@color/white"
|
||||
android:shadowColor="#55000000"
|
||||
android:shadowDx="6"
|
||||
android:shadowDy="6"
|
||||
android:shadowRadius="6"
|
||||
/>
|
||||
</RelativeLayout>
|
Loading…
Reference in New Issue
Block a user