mirror of https://github.com/m2049r/xmrwallet.git
spinner tweaks (#306)
This commit is contained in:
parent
0bcf156929
commit
843566b820
|
@ -101,7 +101,9 @@ public class WalletFragment extends Fragment
|
|||
ivSynced = (ImageView) view.findViewById(R.id.ivSynced);
|
||||
|
||||
sCurrency = (Spinner) view.findViewById(R.id.sCurrency);
|
||||
sCurrency.setAdapter(ArrayAdapter.createFromResource(getContext(), R.array.currency, R.layout.item_spinner_balance));
|
||||
ArrayAdapter currencyAdapter = ArrayAdapter.createFromResource(getContext(), R.array.currency, R.layout.item_spinner_balance);
|
||||
currencyAdapter.setDropDownViewResource(R.layout.item_spinner_dropdown_item);
|
||||
sCurrency.setAdapter(currencyAdapter);
|
||||
|
||||
bSend = (Button) view.findViewById(R.id.bSend);
|
||||
bReceive = (Button) view.findViewById(R.id.bReceive);
|
||||
|
|
|
@ -30,6 +30,7 @@ import android.view.LayoutInflater;
|
|||
import android.view.View;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
|
@ -166,7 +167,11 @@ public class ExchangeView extends LinearLayout
|
|||
etAmount = (TextInputLayout) findViewById(R.id.etAmount);
|
||||
tvAmountB = (TextView) findViewById(R.id.tvAmountB);
|
||||
sCurrencyA = (Spinner) findViewById(R.id.sCurrencyA);
|
||||
ArrayAdapter adapter = ArrayAdapter.createFromResource(getContext(), R.array.currency, R.layout.item_spinner);
|
||||
adapter.setDropDownViewResource(R.layout.item_spinner_dropdown_item);
|
||||
sCurrencyA.setAdapter(adapter);
|
||||
sCurrencyB = (Spinner) findViewById(R.id.sCurrencyB);
|
||||
sCurrencyB.setAdapter(adapter);
|
||||
evExchange = (ImageView) findViewById(R.id.evExchange);
|
||||
pbExchange = (ProgressBar) findViewById(R.id.pbExchange);
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
android:layout_marginStart="8dp"
|
||||
android:entries="@array/currency"
|
||||
android:gravity="center"
|
||||
android:minWidth="80dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingStart="4dp"
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@android:id/text1"
|
||||
style="?android:attr/spinnerItemStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
tools:text="XMR" />
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@android:id/text1"
|
||||
style="?android:attr/spinnerDropDownItemStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:minWidth="64dp"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="marquee"
|
||||
android:padding="4dp"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="center" />
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:showIn="LinearLayout"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:showIn="LinearLayout">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -12,12 +12,12 @@
|
|||
|
||||
<Spinner
|
||||
android:id="@+id/sCurrencyA"
|
||||
android:layout_width="56dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:entries="@array/currency"
|
||||
android:gravity="center"
|
||||
android:textAlignment="center" />
|
||||
android:minWidth="56dp" />
|
||||
|
||||
<com.m2049r.xmrwallet.widget.CTextInputLayout
|
||||
android:id="@+id/etAmount"
|
||||
|
@ -49,19 +49,18 @@
|
|||
<Spinner
|
||||
android:id="@+id/sCurrencyB"
|
||||
style="@style/MoneroSpinnerGray"
|
||||
android:layout_width="56sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:entries="@array/currency"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:minWidth="56dp"
|
||||
android:textAlignment="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAmountB"
|
||||
style="@style/MoneroText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center|start"
|
||||
android:layout_marginStart="16dp"
|
||||
|
|
Loading…
Reference in New Issue