Apostolos Fanakis
6 years ago
29 changed files with 889 additions and 546 deletions
@ -0,0 +1,105 @@ |
|||||
|
package gr.auth.databases.flavours.activities; |
||||
|
|
||||
|
import android.os.Bundle; |
||||
|
import android.view.MenuItem; |
||||
|
import android.view.View; |
||||
|
import android.widget.AdapterView; |
||||
|
import android.widget.ArrayAdapter; |
||||
|
import android.widget.EditText; |
||||
|
import android.widget.Spinner; |
||||
|
|
||||
|
import androidx.appcompat.app.ActionBar; |
||||
|
import androidx.appcompat.widget.AppCompatButton; |
||||
|
import androidx.appcompat.widget.Toolbar; |
||||
|
import gr.auth.databases.flavours.R; |
||||
|
import gr.auth.databases.flavours.base.BaseActivity; |
||||
|
import gr.auth.databases.flavours.model.ItemRating; |
||||
|
import gr.auth.databases.flavours.model.ItemSummary; |
||||
|
|
||||
|
public class RateItemActivity extends BaseActivity implements AdapterView.OnItemSelectedListener { |
||||
|
public static final String BUNDLE_RATE_ITEM_TYPE = "BUNDLE_RATE_ITEM_TYPE"; |
||||
|
|
||||
|
private ItemSummary.ItemType itemType; |
||||
|
private EditText ratingText; |
||||
|
private int ratingGrade; |
||||
|
private ItemRating.PortionSize ratingPortionSize; |
||||
|
|
||||
|
@Override |
||||
|
protected void onCreate(Bundle savedInstanceState) { |
||||
|
super.onCreate(savedInstanceState); |
||||
|
setContentView(R.layout.activity_rate_item); |
||||
|
|
||||
|
Bundle extras = getIntent().getExtras(); |
||||
|
if (extras != null) { |
||||
|
itemType = (ItemSummary.ItemType) extras.getSerializable(BUNDLE_RATE_ITEM_TYPE); |
||||
|
} |
||||
|
|
||||
|
Toolbar toolbar = findViewById(R.id.rate_item_toolbar); |
||||
|
setSupportActionBar(toolbar); |
||||
|
ActionBar actionbar = getSupportActionBar(); |
||||
|
if (actionbar != null) { |
||||
|
actionbar.setDisplayHomeAsUpEnabled(true); |
||||
|
actionbar.setHomeAsUpIndicator(R.drawable.ic_menu_black_24dp); |
||||
|
} |
||||
|
|
||||
|
Spinner gradeSpinner = findViewById(R.id.rate_item_grade); |
||||
|
ArrayAdapter<CharSequence> gradeAdapter = ArrayAdapter.createFromResource(this, |
||||
|
R.array.rating_grade, android.R.layout.simple_spinner_item); |
||||
|
gradeAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); |
||||
|
gradeSpinner.setAdapter(gradeAdapter); |
||||
|
gradeSpinner.setOnItemSelectedListener(this); |
||||
|
|
||||
|
Spinner portionSizeSpinner = findViewById(R.id.rate_item_portion_size); |
||||
|
ArrayAdapter<CharSequence> portionSizeAdapter = ArrayAdapter.createFromResource(this, |
||||
|
R.array.rating_portion_size, android.R.layout.simple_spinner_item); |
||||
|
portionSizeAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); |
||||
|
portionSizeSpinner.setAdapter(portionSizeAdapter); |
||||
|
portionSizeSpinner.setOnItemSelectedListener(this); |
||||
|
|
||||
|
ratingText = findViewById(R.id.rate_item_text); |
||||
|
|
||||
|
AppCompatButton rateButton = findViewById(R.id.rate_item_rate_btn); |
||||
|
rateButton.setOnClickListener(new View.OnClickListener() { |
||||
|
@Override |
||||
|
public void onClick(View view) { |
||||
|
//TODO
|
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
createDrawer(); |
||||
|
drawer.setSelection(-1); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void onBackPressed() { |
||||
|
if (drawer.isDrawerOpen()) { |
||||
|
drawer.closeDrawer(); |
||||
|
} else { |
||||
|
super.onBackPressed(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public boolean onOptionsItemSelected(MenuItem item) { |
||||
|
int id = item.getItemId(); |
||||
|
|
||||
|
if (id == android.R.id.home) { |
||||
|
drawer.openDrawer(); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
return super.onOptionsItemSelected(item); |
||||
|
} |
||||
|
|
||||
|
public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) { |
||||
|
if (parent.getId() == R.id.rate_item_grade) { |
||||
|
ratingGrade = pos + 1; |
||||
|
} else if (parent.getId() == R.id.rate_item_portion_size) { |
||||
|
ratingPortionSize = ItemRating.PortionSize.getEnumTypeFromId(pos); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void onNothingSelected(AdapterView<?> adapterView) { |
||||
|
} |
||||
|
} |
@ -0,0 +1,120 @@ |
|||||
|
package gr.auth.databases.flavours.activities; |
||||
|
|
||||
|
import android.os.Bundle; |
||||
|
import android.util.Log; |
||||
|
import android.view.MenuItem; |
||||
|
import android.view.View; |
||||
|
import android.widget.AdapterView; |
||||
|
import android.widget.ArrayAdapter; |
||||
|
import android.widget.EditText; |
||||
|
import android.widget.Spinner; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
import androidx.appcompat.app.ActionBar; |
||||
|
import androidx.appcompat.widget.AppCompatButton; |
||||
|
import androidx.appcompat.widget.Toolbar; |
||||
|
import gr.auth.databases.flavours.R; |
||||
|
import gr.auth.databases.flavours.base.BaseActivity; |
||||
|
import gr.auth.databases.flavours.model.RestaurantRating; |
||||
|
|
||||
|
public class RateRestaurantActivity extends BaseActivity implements AdapterView.OnItemSelectedListener { |
||||
|
public static final String BUNDLE_RATE_RESTAURANT_NAME = "BUNDLE_RATE_RESTAURANT_NAME"; |
||||
|
|
||||
|
private EditText ratingText; |
||||
|
private int ratingGrade; |
||||
|
private RestaurantRating.Accessibility ratingAccessibility; |
||||
|
|
||||
|
@Override |
||||
|
protected void onCreate(Bundle savedInstanceState) { |
||||
|
super.onCreate(savedInstanceState); |
||||
|
setContentView(R.layout.activity_rate_restaurant); |
||||
|
|
||||
|
Bundle extras = getIntent().getExtras(); |
||||
|
if (extras != null) { |
||||
|
//itemType = (ItemSummary.ItemType) extras.getSerializable(BUNDLE_ADD_ITEM_ITEM_TYPE);
|
||||
|
} |
||||
|
|
||||
|
Toolbar toolbar = findViewById(R.id.rate_restaurant_toolbar); |
||||
|
setSupportActionBar(toolbar); |
||||
|
ActionBar actionbar = getSupportActionBar(); |
||||
|
if (actionbar != null) { |
||||
|
actionbar.setDisplayHomeAsUpEnabled(true); |
||||
|
actionbar.setHomeAsUpIndicator(R.drawable.ic_menu_black_24dp); |
||||
|
} |
||||
|
|
||||
|
Spinner gradeSpinner = findViewById(R.id.rate_restaurant_grade); |
||||
|
ArrayAdapter<CharSequence> gradeAdapter = ArrayAdapter.createFromResource(this, |
||||
|
R.array.rating_grade, android.R.layout.simple_spinner_item); |
||||
|
gradeAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); |
||||
|
gradeSpinner.setAdapter(gradeAdapter); |
||||
|
gradeSpinner.setOnItemSelectedListener(this); |
||||
|
|
||||
|
Spinner accessibilitySpinner = findViewById(R.id.rate_restaurant_accessibility); |
||||
|
ArrayAdapter<CharSequence> accessibilityAdapter = ArrayAdapter.createFromResource(this, |
||||
|
R.array.rating_accessibility, android.R.layout.simple_spinner_item); |
||||
|
accessibilityAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); |
||||
|
accessibilitySpinner.setAdapter(accessibilityAdapter); |
||||
|
accessibilitySpinner.setOnItemSelectedListener(this); |
||||
|
|
||||
|
List<String> spinnerArray = new ArrayList<String>(); |
||||
|
spinnerArray.add("Όγκος"); |
||||
|
spinnerArray.add("Πολύ όγκος"); |
||||
|
|
||||
|
Spinner dietSpinner = findViewById(R.id.rate_restaurant_diet); |
||||
|
ArrayAdapter<String> dietAdapter = new ArrayAdapter<>(this, |
||||
|
android.R.layout.simple_spinner_item, spinnerArray); |
||||
|
dietAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); |
||||
|
dietSpinner.setAdapter(dietAdapter); |
||||
|
dietSpinner.setOnItemSelectedListener(this); |
||||
|
dietSpinner.setVisibility(View.VISIBLE); |
||||
|
|
||||
|
ratingText = findViewById(R.id.rate_restaurant_text); |
||||
|
|
||||
|
AppCompatButton rateButton = findViewById(R.id.rate_restaurant_rate_btn); |
||||
|
rateButton.setOnClickListener(new View.OnClickListener() { |
||||
|
@Override |
||||
|
public void onClick(View view) { |
||||
|
//TODO
|
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
createDrawer(); |
||||
|
drawer.setSelection(-1); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void onBackPressed() { |
||||
|
if (drawer.isDrawerOpen()) { |
||||
|
drawer.closeDrawer(); |
||||
|
} else { |
||||
|
super.onBackPressed(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public boolean onOptionsItemSelected(MenuItem item) { |
||||
|
int id = item.getItemId(); |
||||
|
|
||||
|
if (id == android.R.id.home) { |
||||
|
drawer.openDrawer(); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
return super.onOptionsItemSelected(item); |
||||
|
} |
||||
|
|
||||
|
public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) { |
||||
|
if (parent.getId() == R.id.rate_restaurant_grade) { |
||||
|
ratingGrade = pos + 1; |
||||
|
} else if (parent.getId() == R.id.rate_restaurant_accessibility) { |
||||
|
ratingAccessibility = RestaurantRating.Accessibility.getEnumTypeFromId(pos); |
||||
|
} else if (parent.getId() == R.id.rate_restaurant_diet) { |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void onNothingSelected(AdapterView<?> adapterView) { |
||||
|
} |
||||
|
} |
@ -1,34 +0,0 @@ |
|||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
|
||||
xmlns:aapt="http://schemas.android.com/aapt" |
|
||||
android:width="108dp" |
|
||||
android:height="108dp" |
|
||||
android:viewportWidth="108" |
|
||||
android:viewportHeight="108"> |
|
||||
<path |
|
||||
android:fillType="evenOdd" |
|
||||
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z" |
|
||||
android:strokeWidth="1" |
|
||||
android:strokeColor="#00000000"> |
|
||||
<aapt:attr name="android:fillColor"> |
|
||||
<gradient |
|
||||
android:endX="78.5885" |
|
||||
android:endY="90.9159" |
|
||||
android:startX="48.7653" |
|
||||
android:startY="61.0927" |
|
||||
android:type="linear"> |
|
||||
<item |
|
||||
android:color="#44000000" |
|
||||
android:offset="0.0" /> |
|
||||
<item |
|
||||
android:color="#00000000" |
|
||||
android:offset="1.0" /> |
|
||||
</gradient> |
|
||||
</aapt:attr> |
|
||||
</path> |
|
||||
<path |
|
||||
android:fillColor="#FFFFFF" |
|
||||
android:fillType="nonZero" |
|
||||
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z" |
|
||||
android:strokeWidth="1" |
|
||||
android:strokeColor="#00000000" /> |
|
||||
</vector> |
|
@ -1,170 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
|
||||
android:width="108dp" |
|
||||
android:height="108dp" |
|
||||
android:viewportWidth="108" |
|
||||
android:viewportHeight="108"> |
|
||||
<path |
|
||||
android:fillColor="#008577" |
|
||||
android:pathData="M0,0h108v108h-108z" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M9,0L9,108" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M19,0L19,108" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M29,0L29,108" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M39,0L39,108" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M49,0L49,108" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M59,0L59,108" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M69,0L69,108" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M79,0L79,108" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M89,0L89,108" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M99,0L99,108" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M0,9L108,9" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M0,19L108,19" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M0,29L108,29" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M0,39L108,39" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M0,49L108,49" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M0,59L108,59" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M0,69L108,69" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M0,79L108,79" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M0,89L108,89" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M0,99L108,99" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M19,29L89,29" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M19,39L89,39" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M19,49L89,49" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M19,59L89,59" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M19,69L89,69" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M19,79L89,79" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M29,19L29,89" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M39,19L39,89" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M49,19L49,89" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M59,19L59,89" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M69,19L69,89" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
<path |
|
||||
android:fillColor="#00000000" |
|
||||
android:pathData="M79,19L79,89" |
|
||||
android:strokeWidth="0.8" |
|
||||
android:strokeColor="#33FFFFFF" /> |
|
||||
</vector> |
|
@ -0,0 +1,105 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout 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="@android:color/background_light" |
||||
|
android:fitsSystemWindows="true"> |
||||
|
|
||||
|
<com.google.android.material.appbar.AppBarLayout |
||||
|
android:id="@+id/rate_item_appbar" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:theme="@style/Theme.AppCompat.Light"> |
||||
|
|
||||
|
<androidx.appcompat.widget.Toolbar |
||||
|
android:id="@+id/rate_item_toolbar" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="?attr/actionBarSize" |
||||
|
android:background="?attr/colorPrimary" |
||||
|
app:popupTheme="@style/Theme.AppCompat.Light" |
||||
|
app:title="@string/rate_item_toolbar_title" /> |
||||
|
</com.google.android.material.appbar.AppBarLayout> |
||||
|
|
||||
|
<androidx.core.widget.NestedScrollView |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="match_parent" |
||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"> |
||||
|
|
||||
|
<LinearLayout |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginStart="4dp" |
||||
|
android:layout_marginEnd="4dp" |
||||
|
android:focusableInTouchMode="true" |
||||
|
android:orientation="vertical"> |
||||
|
|
||||
|
<LinearLayout |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginTop="5dp" |
||||
|
android:layout_marginBottom="5dp" |
||||
|
android:orientation="horizontal"> |
||||
|
|
||||
|
<TextView |
||||
|
android:layout_width="0dp" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_gravity="center_vertical" |
||||
|
android:layout_weight="1" |
||||
|
android:text="@string/rate_item_grade_title" |
||||
|
android:textSize="16sp" |
||||
|
android:textStyle="bold" /> |
||||
|
|
||||
|
<androidx.appcompat.widget.AppCompatSpinner |
||||
|
android:id="@+id/rate_item_grade" |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" /> |
||||
|
</LinearLayout> |
||||
|
|
||||
|
<LinearLayout |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginBottom="5dp" |
||||
|
android:orientation="horizontal"> |
||||
|
|
||||
|
<TextView |
||||
|
android:layout_width="0dp" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_gravity="center_vertical" |
||||
|
android:layout_weight="1" |
||||
|
android:text="@string/rate_item_portion_size_title" |
||||
|
android:textSize="16sp" |
||||
|
android:textStyle="bold" /> |
||||
|
|
||||
|
<androidx.appcompat.widget.AppCompatSpinner |
||||
|
android:id="@+id/rate_item_portion_size" |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" /> |
||||
|
</LinearLayout> |
||||
|
|
||||
|
<com.google.android.material.textfield.TextInputLayout |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginBottom="5dp" |
||||
|
app:passwordToggleEnabled="true"> |
||||
|
|
||||
|
<EditText |
||||
|
android:id="@+id/rate_item_text" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:hint="@string/rate_item_text" |
||||
|
android:importantForAutofill="no" |
||||
|
android:inputType="textMultiLine" |
||||
|
tools:targetApi="o" /> |
||||
|
</com.google.android.material.textfield.TextInputLayout> |
||||
|
|
||||
|
<androidx.appcompat.widget.AppCompatButton |
||||
|
android:id="@+id/rate_item_rate_btn" |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_gravity="end" |
||||
|
android:text="@string/rate_item_rate_btn" /> |
||||
|
</LinearLayout> |
||||
|
</androidx.core.widget.NestedScrollView> |
||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout> |
@ -0,0 +1,127 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout 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="@android:color/background_light" |
||||
|
android:fitsSystemWindows="true"> |
||||
|
|
||||
|
<com.google.android.material.appbar.AppBarLayout |
||||
|
android:id="@+id/rate_restaurant_appbar" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:theme="@style/Theme.AppCompat.Light"> |
||||
|
|
||||
|
<androidx.appcompat.widget.Toolbar |
||||
|
android:id="@+id/rate_restaurant_toolbar" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="?attr/actionBarSize" |
||||
|
android:background="?attr/colorPrimary" |
||||
|
app:popupTheme="@style/Theme.AppCompat.Light" |
||||
|
app:title="@string/rate_restaurant_toolbar_title" /> |
||||
|
</com.google.android.material.appbar.AppBarLayout> |
||||
|
|
||||
|
<androidx.core.widget.NestedScrollView |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="match_parent" |
||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"> |
||||
|
|
||||
|
<LinearLayout |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginStart="4dp" |
||||
|
android:layout_marginEnd="4dp" |
||||
|
android:focusableInTouchMode="true" |
||||
|
android:orientation="vertical"> |
||||
|
|
||||
|
<LinearLayout |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginTop="5dp" |
||||
|
android:layout_marginBottom="5dp" |
||||
|
android:orientation="horizontal"> |
||||
|
|
||||
|
<TextView |
||||
|
android:layout_width="0dp" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_gravity="center_vertical" |
||||
|
android:layout_weight="1" |
||||
|
android:text="@string/rate_restaurant_grade_title" |
||||
|
android:textSize="16sp" |
||||
|
android:textStyle="bold" /> |
||||
|
|
||||
|
<androidx.appcompat.widget.AppCompatSpinner |
||||
|
android:id="@+id/rate_restaurant_grade" |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" /> |
||||
|
</LinearLayout> |
||||
|
|
||||
|
<LinearLayout |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginBottom="5dp" |
||||
|
android:orientation="horizontal"> |
||||
|
|
||||
|
<TextView |
||||
|
android:layout_width="0dp" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_gravity="center_vertical" |
||||
|
android:layout_weight="1" |
||||
|
android:text="@string/rate_restaurant_accessibility_title" |
||||
|
android:textSize="16sp" |
||||
|
android:textStyle="bold" /> |
||||
|
|
||||
|
<androidx.appcompat.widget.AppCompatSpinner |
||||
|
android:id="@+id/rate_restaurant_accessibility" |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" /> |
||||
|
</LinearLayout> |
||||
|
|
||||
|
<LinearLayout |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginBottom="5dp" |
||||
|
android:orientation="horizontal"> |
||||
|
|
||||
|
<TextView |
||||
|
android:layout_width="0dp" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_gravity="center_vertical" |
||||
|
android:layout_weight="1" |
||||
|
android:text="@string/rate_restaurant_diet_title" |
||||
|
android:textSize="16sp" |
||||
|
android:textStyle="bold" /> |
||||
|
|
||||
|
<androidx.appcompat.widget.AppCompatSpinner |
||||
|
android:id="@+id/rate_restaurant_diet" |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:visibility="gone" /> |
||||
|
</LinearLayout> |
||||
|
|
||||
|
<com.google.android.material.textfield.TextInputLayout |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginBottom="5dp" |
||||
|
app:passwordToggleEnabled="true"> |
||||
|
|
||||
|
<EditText |
||||
|
android:id="@+id/rate_restaurant_text" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:hint="@string/rate_restaurant_text" |
||||
|
android:importantForAutofill="no" |
||||
|
android:inputType="textMultiLine" |
||||
|
tools:targetApi="o" /> |
||||
|
</com.google.android.material.textfield.TextInputLayout> |
||||
|
|
||||
|
<androidx.appcompat.widget.AppCompatButton |
||||
|
android:id="@+id/rate_restaurant_rate_btn" |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_gravity="end" |
||||
|
android:text="@string/rate_restaurant_rate_btn" /> |
||||
|
</LinearLayout> |
||||
|
</androidx.core.widget.NestedScrollView> |
||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout> |
@ -1,12 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<menu 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" |
|
||||
tools:context=".activities.main.MainActivity"> |
|
||||
<item |
|
||||
android:id="@+id/restaurant_toolbar_menu_map" |
|
||||
android:icon="@drawable/ic_map_black_24dp" |
|
||||
android:orderInCategory="200" |
|
||||
android:title="@string/main_toolbar_menu_map" |
|
||||
app:showAsAction="ifRoom" /> |
|
||||
</menu> |
|
@ -1,10 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<resources> |
|
||||
<string-array name="item_grade"> |
|
||||
<item>1</item> |
|
||||
<item>2</item> |
|
||||
<item>3</item> |
|
||||
<item>4</item> |
|
||||
<item>5</item> |
|
||||
</string-array> |
|
||||
</resources> |
|
@ -0,0 +1,8 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<resources> |
||||
|
<string-array name="rating_accessibility"> |
||||
|
<item>Easy</item> |
||||
|
<item>Moderate</item> |
||||
|
<item>Hard</item> |
||||
|
</string-array> |
||||
|
</resources> |
@ -0,0 +1,10 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<resources> |
||||
|
<string-array name="rating_grade"> |
||||
|
<item>\t\t1\t\t</item> |
||||
|
<item>\t\t2\t\t</item> |
||||
|
<item>\t\t3\t\t</item> |
||||
|
<item>\t\t4\t\t</item> |
||||
|
<item>\t\t5\t\t</item> |
||||
|
</string-array> |
||||
|
</resources> |
@ -0,0 +1,8 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<resources> |
||||
|
<string-array name="rating_portion_size"> |
||||
|
<item>Small</item> |
||||
|
<item>Medium</item> |
||||
|
<item>Big</item> |
||||
|
</string-array> |
||||
|
</resources> |
Loading…
Reference in new issue