Commit 6de2c8b6 authored by Muhammad Suryono's avatar Muhammad Suryono

Fix with cart

parents 2ce9a7db 305aa196
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
<application <application
android:allowBackup="true" android:allowBackup="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher_new_icon"
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_new_icon"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme.appbar"> android:theme="@style/AppTheme.appbar">
<activity android:name=".InvoiceActivity"></activity> <activity android:name=".InvoiceActivity"></activity>
......
...@@ -135,8 +135,3 @@ public class CartActivity extends AppCompatActivity { ...@@ -135,8 +135,3 @@ public class CartActivity extends AppCompatActivity {
} }
} }
/**
* Harga belum bisa di beri String (Rp)
*/
\ No newline at end of file
...@@ -13,12 +13,9 @@ import android.os.PersistableBundle; ...@@ -13,12 +13,9 @@ import android.os.PersistableBundle;
import android.provider.MediaStore; import android.provider.MediaStore;
import android.provider.Settings; import android.provider.Settings;
import android.util.Log; import android.util.Log;
import android.view.View;
import android.view.Window; import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.AdapterView; import android.widget.ImageView;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.Toast; import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
...@@ -37,7 +34,6 @@ import com.yono.messeripos.models.ProductModels; ...@@ -37,7 +34,6 @@ import com.yono.messeripos.models.ProductModels;
import java.io.File; import java.io.File;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.List;
public class FormProductActivity extends AppCompatActivity { public class FormProductActivity extends AppCompatActivity {
...@@ -47,7 +43,6 @@ public class FormProductActivity extends AppCompatActivity { ...@@ -47,7 +43,6 @@ public class FormProductActivity extends AppCompatActivity {
private static final int REQUEST_IMAGE_CAPTURE = 1; private static final int REQUEST_IMAGE_CAPTURE = 1;
private static final int REQUEST_PERMISSIONS = 448; private static final int REQUEST_PERMISSIONS = 448;
private boolean isUpdate = false; private boolean isUpdate = false;
private Spinner splistCategory;
String kondisi_spin; String kondisi_spin;
private static final String[] ANDROID_VERSIONS = { private static final String[] ANDROID_VERSIONS = {
...@@ -98,8 +93,8 @@ public class FormProductActivity extends AppCompatActivity { ...@@ -98,8 +93,8 @@ public class FormProductActivity extends AppCompatActivity {
private void saveProduct(){ private void saveProduct(){
productModels.setProductName(binding.etName.getText().toString()); productModels.setProductName(binding.etName.getText().toString());
productModels.setPriceProduct(Integer.parseInt(binding.etPrice.getText().toString())); // productModels.setPriceProduct(Integer.parseInt(binding.etPrice.getText().toString()));
productModels.setStockProduct(Integer.parseInt(binding.etStock.getText().toString())); // productModels.setStockProduct(Integer.parseInt(binding.etStock.getText().toString()));
Toast.makeText(this, productModels.getImageProduct()+" "+productModels.getProductName(), Toast.LENGTH_LONG).show(); Toast.makeText(this, productModels.getImageProduct()+" "+productModels.getProductName(), Toast.LENGTH_LONG).show();
} }
...@@ -179,5 +174,4 @@ public class FormProductActivity extends AppCompatActivity { ...@@ -179,5 +174,4 @@ public class FormProductActivity extends AppCompatActivity {
cursor.close(); cursor.close();
return result; return result;
} }
} }
...@@ -67,7 +67,7 @@ public class PaymentActivity extends AppCompatActivity { ...@@ -67,7 +67,7 @@ public class PaymentActivity extends AppCompatActivity {
LinearLayoutManager llm = new LinearLayoutManager(this, RecyclerView.VERTICAL, false); LinearLayoutManager llm = new LinearLayoutManager(this, RecyclerView.VERTICAL, false);
rvPayment.setLayoutManager(llm); rvPayment.setLayoutManager(llm);
paymentResponses.add(new PaymentResponse("https://i.ibb.co/RjJQT9K/BNI-logo.png", "cash")); paymentResponses.add(new PaymentResponse("https://i.ibb.co/5c40mWX/cash-logo.png", "cash"));
paymentResponses.add(new PaymentResponse("https://i.ibb.co/XCsdmmT/Bank-Mandiri-logo.png", "mandiri")); paymentResponses.add(new PaymentResponse("https://i.ibb.co/XCsdmmT/Bank-Mandiri-logo.png", "mandiri"));
paymentResponses.add(new PaymentResponse("https://i.ibb.co/2n65nCT/bca-bank-central-asia.png", "bca")); paymentResponses.add(new PaymentResponse("https://i.ibb.co/2n65nCT/bca-bank-central-asia.png", "bca"));
paymentResponses.add(new PaymentResponse("https://i.ibb.co/RjJQT9K/BNI-logo.png", "bni")); paymentResponses.add(new PaymentResponse("https://i.ibb.co/RjJQT9K/BNI-logo.png", "bni"));
......
...@@ -94,12 +94,12 @@ public class ProductModels<T> { ...@@ -94,12 +94,12 @@ public class ProductModels<T> {
@BindingAdapter("path") @BindingAdapter("path")
public static void setPathImage(ImageView view, String path) { public static void setPathImage(ImageView view, String path) {
if (TextUtils.isEmpty(path)) view.setImageResource(R.mipmap.ic_launcher_round); if (TextUtils.isEmpty(path)) view.setImageResource(R.drawable.ic_meser_create);
else { else {
File file = new File(path); File file = new File(path);
if (file.exists()) Glide.with(view).load(file).into(view); if (file.exists()) Glide.with(view).load(file).into(view);
else view.setImageResource(R.mipmap.ic_launcher_round); else view.setImageResource(R.drawable.ic_meser_create);
} }
} }
} }
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="128dp" android:width="63.882dp"
android:height="128dp" android:height="42.76dp"
android:viewportWidth="108" android:viewportWidth="63.882"
android:viewportHeight="108"> android:viewportHeight="42.76">
<group android:scaleX="0.92268676"
android:scaleY="0.92268676"
android:translateX="25.62"
android:translateY="34.272957">
<path <path
android:pathData="M8.5,28.182m-8.5,0a8.5,8.5 0,1 1,17 0a8.5,8.5 0,1 1,-17 0" android:pathData="M8.5,28.182m-8.5,0a8.5,8.5 0,1 1,17 0a8.5,8.5 0,1 1,-17 0"
android:fillColor="#fff"/> android:fillColor="#fff"/>
...@@ -16,5 +12,4 @@ ...@@ -16,5 +12,4 @@
<path <path
android:pathData="M21.5654,6.9739L40.2832,29.2722A6.5737,6.5737 94.989,0 1,39.4747 38.5335L39.4747,38.5335A6.5737,6.5737 94.989,0 1,30.2133 37.7251L11.4956,15.4268A6.5737,6.5737 94.989,0 1,12.3041 6.1654L12.3041,6.1654A6.5737,6.5737 94.989,0 1,21.5654 6.9739z" android:pathData="M21.5654,6.9739L40.2832,29.2722A6.5737,6.5737 94.989,0 1,39.4747 38.5335L39.4747,38.5335A6.5737,6.5737 94.989,0 1,30.2133 37.7251L11.4956,15.4268A6.5737,6.5737 94.989,0 1,12.3041 6.1654L12.3041,6.1654A6.5737,6.5737 94.989,0 1,21.5654 6.9739z"
android:fillColor="#fff"/> android:fillColor="#fff"/>
</group>
</vector> </vector>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="63.882dp" android:width="128dp"
android:height="42.76dp" android:height="128dp"
android:viewportWidth="63.882" android:viewportWidth="108"
android:viewportHeight="42.76"> android:viewportHeight="108">
<group android:scaleX="0.84758437"
android:scaleY="0.84758437"
android:translateX="27.93"
android:translateY="35.878647">
<path <path
android:pathData="M8.5,28.182m-8.5,0a8.5,8.5 0,1 1,17 0a8.5,8.5 0,1 1,-17 0" android:pathData="M8.5,28.182m-8.5,0a8.5,8.5 0,1 1,17 0a8.5,8.5 0,1 1,-17 0"
android:fillColor="#fff"/> android:fillColor="@color/colorWhite"/>
<path <path
android:pathData="M40.9464,5.0349L59.6642,27.3332A6.5737,6.5737 94.989,0 1,58.8557 36.5945L58.8557,36.5945A6.5737,6.5737 94.989,0 1,49.5943 35.7861L30.8766,13.4878A6.5737,6.5737 94.989,0 1,31.6851 4.2264L31.6851,4.2264A6.5737,6.5737 94.989,0 1,40.9464 5.0349z" android:pathData="M40.9464,5.0349L59.6642,27.3332A6.5737,6.5737 94.989,0 1,58.8557 36.5945L58.8557,36.5945A6.5737,6.5737 94.989,0 1,49.5943 35.7861L30.8766,13.4878A6.5737,6.5737 94.989,0 1,31.6851 4.2264L31.6851,4.2264A6.5737,6.5737 94.989,0 1,40.9464 5.0349z"
android:fillColor="#fff"/> android:fillColor="@color/colorWhite"/>
<path <path
android:pathData="M21.5654,6.9739L40.2832,29.2722A6.5737,6.5737 94.989,0 1,39.4747 38.5335L39.4747,38.5335A6.5737,6.5737 94.989,0 1,30.2133 37.7251L11.4956,15.4268A6.5737,6.5737 94.989,0 1,12.3041 6.1654L12.3041,6.1654A6.5737,6.5737 94.989,0 1,21.5654 6.9739z" android:pathData="M21.5654,6.9739L40.2832,29.2722A6.5737,6.5737 94.989,0 1,39.4747 38.5335L39.4747,38.5335A6.5737,6.5737 94.989,0 1,30.2133 37.7251L11.4956,15.4268A6.5737,6.5737 94.989,0 1,12.3041 6.1654L12.3041,6.1654A6.5737,6.5737 94.989,0 1,21.5654 6.9739z"
android:fillColor="#fff"/> android:fillColor="@color/colorWhite"/>
</group>
</vector> </vector>
<vector android:height="167.33978dp" android:viewportHeight="42.76"
android:viewportWidth="63.882" android:width="250dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@color/colorPrimary" android:pathData="M8.5,28.182m-8.5,0a8.5,8.5 0,1 1,17 0a8.5,8.5 0,1 1,-17 0"/>
<path android:fillColor="@color/colorPrimary" android:pathData="M40.9464,5.0349L59.6642,27.3332A6.5737,6.5737 94.989,0 1,58.8557 36.5945L58.8557,36.5945A6.5737,6.5737 94.989,0 1,49.5943 35.7861L30.8766,13.4878A6.5737,6.5737 94.989,0 1,31.6851 4.2264L31.6851,4.2264A6.5737,6.5737 94.989,0 1,40.9464 5.0349z"/>
<path android:fillColor="@color/colorPrimary" android:pathData="M21.5654,6.9739L40.2832,29.2722A6.5737,6.5737 94.989,0 1,39.4747 38.5335L39.4747,38.5335A6.5737,6.5737 94.989,0 1,30.2133 37.7251L11.4956,15.4268A6.5737,6.5737 94.989,0 1,12.3041 6.1654L12.3041,6.1654A6.5737,6.5737 94.989,0 1,21.5654 6.9739z"/>
</vector>
<vector android:height="20.080774dp" android:viewportHeight="42.76"
android:viewportWidth="63.882" android:width="30dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#fff" android:pathData="M8.5,28.182m-8.5,0a8.5,8.5 0,1 1,17 0a8.5,8.5 0,1 1,-17 0"/>
<path android:fillColor="#fff" android:pathData="M40.9464,5.0349L59.6642,27.3332A6.5737,6.5737 94.989,0 1,58.8557 36.5945L58.8557,36.5945A6.5737,6.5737 94.989,0 1,49.5943 35.7861L30.8766,13.4878A6.5737,6.5737 94.989,0 1,31.6851 4.2264L31.6851,4.2264A6.5737,6.5737 94.989,0 1,40.9464 5.0349z"/>
<path android:fillColor="#fff" android:pathData="M21.5654,6.9739L40.2832,29.2722A6.5737,6.5737 94.989,0 1,39.4747 38.5335L39.4747,38.5335A6.5737,6.5737 94.989,0 1,30.2133 37.7251L11.4956,15.4268A6.5737,6.5737 94.989,0 1,12.3041 6.1654L12.3041,6.1654A6.5737,6.5737 94.989,0 1,21.5654 6.9739z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.84758437"
android:scaleY="0.84758437"
android:translateX="27.93"
android:translateY="35.878647">
<path
android:pathData="M8.5,28.182m-8.5,0a8.5,8.5 0,1 1,17 0a8.5,8.5 0,1 1,-17 0"
android:fillColor="@color/colorPrimary"/>
<path
android:pathData="M40.9464,5.0349L59.6642,27.3332A6.5737,6.5737 94.989,0 1,58.8557 36.5945L58.8557,36.5945A6.5737,6.5737 94.989,0 1,49.5943 35.7861L30.8766,13.4878A6.5737,6.5737 94.989,0 1,31.6851 4.2264L31.6851,4.2264A6.5737,6.5737 94.989,0 1,40.9464 5.0349z"
android:fillColor="@color/colorPrimary"/>
<path
android:pathData="M21.5654,6.9739L40.2832,29.2722A6.5737,6.5737 94.989,0 1,39.4747 38.5335L39.4747,38.5335A6.5737,6.5737 94.989,0 1,30.2133 37.7251L11.4956,15.4268A6.5737,6.5737 94.989,0 1,12.3041 6.1654L12.3041,6.1654A6.5737,6.5737 94.989,0 1,21.5654 6.9739z"
android:fillColor="@color/colorPrimary"/>
</group>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="@color/colorWhite"/>
<size android:width="16sp" android:height="16sp"/>
<corners android:radius="100dp"/>
</shape>
</item>
</selector>
\ No newline at end of file
...@@ -6,14 +6,15 @@ ...@@ -6,14 +6,15 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/bg_login" android:background="@drawable/bg_login"
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
android:paddingTop="30dp"
tools:context=".LoginActivity"> tools:context=".LoginActivity">
<ImageView <ImageView
android:id="@+id/ivLogin" android:id="@+id/ivLogin"
android:layout_width="191dp" android:layout_width="150dp"
android:layout_height="166dp" android:layout_height="150dp"
android:src="@drawable/ic_launcher_new_icon_foreground" android:src="@drawable/ic_meser"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:menu="@menu/home" app:menu="@menu/home"
android:elevation="0dp" android:elevation="0dp"
app:navigationIcon="@drawable/ic_meser" app:navigationIcon="@mipmap/ic_meser_icon"
style="@style/Widget.MaterialComponents.Toolbar.Primary" style="@style/Widget.MaterialComponents.Toolbar.Primary"
> >
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
android:id="@+id/image_splash" android:id="@+id/image_splash"
android:layout_width="150dp" android:layout_width="150dp"
android:layout_height="150dp" android:layout_height="150dp"
android:src="@drawable/ic_meser_icon" android:backgroundTint="@android:color/transparent"
android:src="@drawable/ic_launcher_new_icon_foreground"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
android:layout_marginTop="30dp" android:layout_marginTop="30dp"
android:elevation="0dp" android:elevation="0dp"
app:menu="@menu/home" app:menu="@menu/home"
app:navigationIcon="@drawable/ic_meser"> app:navigationIcon="@mipmap/ic_meser_icon">
<EditText <EditText
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
android:layout_height="160dp" android:layout_height="160dp"
android:scaleType="centerCrop" android:scaleType="centerCrop"
app:path="@{photo}" app:path="@{photo}"
android:src="@mipmap/ic_launcher_round" /> android:src="@drawable/ic_meser_create" />
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/tfPrice" android:id="@+id/tfPrice"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -125,6 +126,15 @@ ...@@ -125,6 +126,15 @@
app:ms_background_color="#8888" app:ms_background_color="#8888"
app:ms_background_selector="0xFFFFFF" app:ms_background_selector="0xFFFFFF"
tools:layout_editor_absoluteX="0dp" /> tools:layout_editor_absoluteX="0dp" />
=======
<Spinner
android:id="@+id/planets_spinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tfName"
app:layout_constraintStart_toStartOf="parent"/>
>>>>>>> cart
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btnAdd" android:id="@+id/btnAdd"
...@@ -135,7 +145,6 @@ ...@@ -135,7 +145,6 @@
android:text="@string/add" android:text="@string/add"
android:padding="16dp" android:padding="16dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/listCategory"
app:layout_constraintVertical_bias="1.0" app:layout_constraintVertical_bias="1.0"
tools:ignore="MissingConstraints" tools:ignore="MissingConstraints"
tools:layout_editor_absoluteX="16dp" /> tools:layout_editor_absoluteX="16dp" />
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
android:id="@+id/image_product" android:id="@+id/image_product"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="200dp" android:layout_height="200dp"
android:src="@mipmap/ic_launcher_round" android:src="@mipmap/ic_meser_icon"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:url="@{image}" app:url="@{image}"
android:scaleType="fitXY"/> android:scaleType="fitXY"/>
......
...@@ -32,40 +32,19 @@ ...@@ -32,40 +32,19 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="60dp" android:layout_height="wrap_content"
android:padding="15dp"> android:padding="15dp">
<View
android:id="@+id/icon"
android:layout_width="131dp"
android:layout_height="39dp"
android:layout_margin="15dp"
android:visibility="invisible"
android:layout_gravity="center_vertical"
android:background="@drawable/skeleton"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<ImageView <ImageView
android:id="@+id/ivLogo" android:id="@+id/ivLogo"
android:layout_width="120dp" android:layout_width="120dp"
android:layout_height="40dp" android:layout_height="0dp"
android:src="@drawable/ic_bni_logo" android:src="@drawable/ic_bni_logo"
app:logo_bank="@{logo}" app:logo_bank="@{logo}"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvPayment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:visibility="invisible"
app:layout_constraintStart_toEndOf="@id/ivLogo"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
/> app:layout_constraintBottom_toBottomOf="parent"/>
<RadioButton <RadioButton
android:id="@+id/rbPayment" android:id="@+id/rbPayment"
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/> <background android:drawable="@color/colorPrimary"/>
<foreground android:drawable="@drawable/ic_launcher_new_icon_foreground"/> <foreground android:drawable="@drawable/ic_meser"/>
</adaptive-icon> </adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/> <background android:drawable="@color/colorPrimary"/>
<foreground android:drawable="@drawable/ic_launcher_new_icon_foreground"/> <foreground android:drawable="@drawable/ic_launcher_new_icon_foreground"/>
</adaptive-icon> </adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/rounded_white"/>
<foreground android:drawable="@drawable/ic_meser_icon_foreground"/>
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_meser_icon_background"/>
<foreground android:drawable="@drawable/ic_meser_icon_foreground"/>
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_meser_icon_background">#FFFFFF</color>
</resources>
\ No newline at end of file
...@@ -24,4 +24,16 @@ ...@@ -24,4 +24,16 @@
<string name="add">Add</string> <string name="add">Add</string>
<string name="hint_billing">Billing</string> <string name="hint_billing">Billing</string>
<string-array name="planets_array">
<item>Mercury</item>
<item>Venus</item>
<item>Earth</item>
<item>Mars</item>
<item>Jupiter</item>
<item>Saturn</item>
<item>Uranus</item>
<item>Neptune</item>
</string-array>
</resources> </resources>
\ No newline at end of file
...@@ -15,5 +15,8 @@ dependencies { ...@@ -15,5 +15,8 @@ dependencies {
implementation 'androidx.annotation:annotation:1.0.0' implementation 'androidx.annotation:annotation:1.0.0'
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
} }
<<<<<<< HEAD
apply from: rootProject.file('gradle/maven-push.gradle') apply from: rootProject.file('gradle/maven-push.gradle')
=======
>>>>>>> cart
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.jaredrummler.materialspinner.example"
minSdkVersion 14
targetSdkVersion 28
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}
dependencies {
implementation 'com.google.android.material:material:1.0.0'
implementation project(':library')
}
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\android-sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2016 Jared Rummler
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<manifest package="com.jaredrummler.materialspinner.example"
xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
/*
* Copyright (C) 2016 Jared Rummler
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.jaredrummler.materialspinner.example;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import com.jaredrummler.materialspinner.MaterialSpinner;
public class MainActivity extends AppCompatActivity {
private static final String[] ANDROID_VERSIONS = {
"Cupcake",
"Donut",
"Eclair",
"Froyo",
"Gingerbread",
"Honeycomb",
"Ice Cream Sandwich",
"Jelly Bean",
"KitKat",
"Lollipop",
"Marshmallow",
"Nougat",
"Oreo"
};
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View view) {
try {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/jaredrummler/MaterialSpinner")));
} catch (ActivityNotFoundException ignored) {
}
}
});
MaterialSpinner spinner = (MaterialSpinner) findViewById(R.id.spinner);
spinner.setItems(ANDROID_VERSIONS);
spinner.setOnItemSelectedListener(new MaterialSpinner.OnItemSelectedListener<String>() {
@Override public void onItemSelected(MaterialSpinner view, int position, long id, String item) {
Snackbar.make(view, "Clicked " + item, Snackbar.LENGTH_LONG).show();
}
});
spinner.setOnNothingSelectedListener(new MaterialSpinner.OnNothingSelectedListener() {
@Override public void onNothingSelected(MaterialSpinner spinner) {
Snackbar.make(spinner, "Nothing selected", Snackbar.LENGTH_LONG).show();
}
});
}
}
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2016 Jared Rummler
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z"/>
</vector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2016 Jared Rummler
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<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:fitsSystemWindows="true"
tools:context=".MainActivity">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay"/>
</com.google.android.material.appbar.AppBarLayout>
<include layout="@layout/content_main"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
android:src="@drawable/ic_github_white_24dp"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2016 Jared Rummler
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<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:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context=".MainActivity"
tools:showIn="@layout/activity_main">
<com.jaredrummler.materialspinner.MaterialSpinner
android:id="@+id/spinner"
app:ms_dropdown_max_height="350dp"
app:ms_dropdown_height="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</RelativeLayout>
<!--
~ Copyright (C) 2016 Jared Rummler
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<resources>>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
</resources>
<!--
~ Copyright (C) 2016 Jared Rummler
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2016 Jared Rummler
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>
<!--
~ Copyright (C) 2016 Jared Rummler
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="fab_margin">16dp</dimen>
</resources>
<!--
~ Copyright (C) 2016 Jared Rummler
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<resources>
<string name="app_name">Material Spinner</string>
</resources>
<!--
~ Copyright (C) 2016 Jared Rummler
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.MaterialComponents.Dark.ActionBar"/>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.MaterialComponents.Light"/>
</resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment