mirror of
https://github.com/m2049r/xmrwallet
synced 2025-05-16 12:39:49 +02:00
exchange & toolbar layout (#111)
This commit is contained in:
parent
f951e1a621
commit
d3beb7ca3f
app
build.gradle
src/main
@ -8,8 +8,8 @@ android {
|
|||||||
applicationId "com.m2049r.xmrwallet"
|
applicationId "com.m2049r.xmrwallet"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
versionCode 31
|
versionCode 33
|
||||||
versionName "1.1.3-alpha"
|
versionName "1.1.5-alpha"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
|
@ -96,7 +96,7 @@ public class WalletFragment extends Fragment
|
|||||||
ivSynced = (ImageView) view.findViewById(R.id.ivSynced);
|
ivSynced = (ImageView) view.findViewById(R.id.ivSynced);
|
||||||
|
|
||||||
sCurrency = (Spinner) view.findViewById(R.id.sCurrency);
|
sCurrency = (Spinner) view.findViewById(R.id.sCurrency);
|
||||||
sCurrency.setAdapter(ArrayAdapter.createFromResource(getContext(), R.array.currency, R.layout.item_spinner));
|
sCurrency.setAdapter(ArrayAdapter.createFromResource(getContext(), R.array.currency, R.layout.item_spinner_balance));
|
||||||
|
|
||||||
bSend = (Button) view.findViewById(R.id.bSend);
|
bSend = (Button) view.findViewById(R.id.bSend);
|
||||||
bReceive = (Button) view.findViewById(R.id.bReceive);
|
bReceive = (Button) view.findViewById(R.id.bReceive);
|
||||||
|
12
app/src/main/res/drawable/backgound_spinner_gray.xml
Normal file
12
app/src/main/res/drawable/backgound_spinner_gray.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<padding
|
||||||
|
android:bottom="8dp"
|
||||||
|
android:left="8dp"
|
||||||
|
android:right="8dp"
|
||||||
|
android:top="8dp" />
|
||||||
|
<stroke
|
||||||
|
android:width="2dp"
|
||||||
|
android:color="@color/moneroGray" />
|
||||||
|
</shape>
|
@ -10,7 +10,7 @@
|
|||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/ToolBarStyle.Event"
|
style="@style/ToolBarStyle.Event"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="@drawable/backgound_toolbar_mainnet"
|
android:background="@drawable/backgound_toolbar_mainnet"
|
||||||
android:minHeight="?attr/actionBarSize" />
|
android:minHeight="?attr/actionBarSize" />
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/ToolBarStyle.Event"
|
style="@style/ToolBarStyle.Event"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="@drawable/backgound_toolbar_mainnet"
|
android:background="@drawable/backgound_toolbar_mainnet"
|
||||||
android:minHeight="?attr/actionBarSize" />
|
android:minHeight="?attr/actionBarSize" />
|
||||||
|
|
||||||
|
@ -50,13 +50,15 @@
|
|||||||
android:id="@+id/evAmount"
|
android:id="@+id/evAmount"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16sp" />
|
android:layout_marginBottom="16sp"
|
||||||
|
android:layout_marginTop="16sp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingEnd="56dp"
|
||||||
|
android:paddingStart="56dp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="4sp"
|
|
||||||
android:layout_marginTop="8sp"
|
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:weightSum="10">
|
android:weightSum="10">
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="4sp"
|
|
||||||
android:layout_marginTop="4sp"
|
android:layout_marginTop="4sp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:weightSum="10">
|
android:weightSum="10">
|
||||||
@ -59,14 +58,16 @@
|
|||||||
android:id="@+id/evAmount"
|
android:id="@+id/evAmount"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="4sp"
|
android:layout_marginBottom="16sp"
|
||||||
android:layout_marginTop="4sp" />
|
android:layout_marginTop="16sp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingEnd="56dp"
|
||||||
|
android:paddingStart="56dp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="4sp"
|
android:layout_marginBottom="4sp"
|
||||||
android:layout_marginTop="4sp"
|
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:weightSum="10">
|
android:weightSum="10">
|
||||||
|
|
||||||
@ -109,7 +110,7 @@
|
|||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/MoneroLabel.Caps.Stealth.Small"
|
style="@style/MoneroLabel.Caps.Gray.Small"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center|end"
|
android:layout_gravity="center|end"
|
||||||
@ -119,6 +120,7 @@
|
|||||||
|
|
||||||
<Spinner
|
<Spinner
|
||||||
android:id="@+id/sMixin"
|
android:id="@+id/sMixin"
|
||||||
|
style="@style/MoneroSpinnerGray"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="8sp"
|
android:layout_marginEnd="8sp"
|
||||||
@ -128,6 +130,7 @@
|
|||||||
|
|
||||||
<Spinner
|
<Spinner
|
||||||
android:id="@+id/sPriority"
|
android:id="@+id/sPriority"
|
||||||
|
style="@style/MoneroSpinnerGray"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
android:paddingEnd="4dp"
|
android:paddingEnd="4dp"
|
||||||
android:paddingStart="4dp"
|
android:paddingStart="4dp"
|
||||||
android:paddingTop="0dp"
|
android:paddingTop="0dp"
|
||||||
tools:listitem="@layout/item_spinner" />
|
tools:listitem="@layout/item_spinner_balance" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -3,84 +3,97 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<com.m2049r.xmrwallet.layout.CTextInputLayout
|
<LinearLayout
|
||||||
android:id="@+id/etAmount"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="3"
|
android:layout_marginStart="4dp"
|
||||||
app:counterEnabled="false"
|
android:orientation="horizontal">
|
||||||
app:errorEnabled="true">
|
|
||||||
|
|
||||||
<android.support.design.widget.TextInputEditText
|
<Spinner
|
||||||
style="@style/MoneroEdit"
|
android:id="@+id/sCurrencyA"
|
||||||
|
android:layout_width="56sp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:entries="@array/currency"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textAlignment="center" />
|
||||||
|
|
||||||
|
<com.m2049r.xmrwallet.layout.CTextInputLayout
|
||||||
|
android:id="@+id/etAmount"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="end"
|
android:layout_marginStart="16dp"
|
||||||
android:hint="@string/receive_amount_hint"
|
app:counterEnabled="false"
|
||||||
android:imeOptions="actionDone"
|
app:errorEnabled="true">
|
||||||
android:inputType="numberDecimal"
|
|
||||||
|
<android.support.design.widget.TextInputEditText
|
||||||
|
style="@style/MoneroEdit"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="start"
|
||||||
|
android:hint="@string/receive_amount_hint"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="numberDecimal"
|
||||||
|
tools:text="87.00000" />
|
||||||
|
|
||||||
|
</com.m2049r.xmrwallet.layout.CTextInputLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/sCurrencyB"
|
||||||
|
style="@style/MoneroSpinnerGray"
|
||||||
|
android:layout_width="56sp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:entries="@array/currency"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingBottom="8dp"
|
||||||
|
android:paddingTop="8dp"
|
||||||
|
android:textAlignment="center" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvAmountB"
|
||||||
|
style="@style/MoneroText"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center|start"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_weight="3"
|
||||||
|
android:padding="4dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="--"
|
||||||
tools:text="87.00000" />
|
tools:text="87.00000" />
|
||||||
|
|
||||||
</com.m2049r.xmrwallet.layout.CTextInputLayout>
|
<FrameLayout
|
||||||
|
|
||||||
<Spinner
|
|
||||||
android:id="@+id/sCurrencyA"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:entries="@array/currency"
|
|
||||||
android:gravity="center"
|
|
||||||
android:paddingBottom="8dp"
|
|
||||||
android:paddingTop="8dp"
|
|
||||||
android:textAlignment="center" />
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginEnd="0sp"
|
|
||||||
android:layout_marginStart="8sp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/evExchange"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@drawable/ic_traffic" />
|
android:layout_marginEnd="0sp"
|
||||||
|
android:layout_marginStart="8sp">
|
||||||
|
|
||||||
<ProgressBar
|
<ImageView
|
||||||
android:id="@+id/pbExchange"
|
android:id="@+id/evExchange"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:indeterminate="true"
|
android:src="@drawable/ic_traffic" />
|
||||||
android:visibility="invisible" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<TextView
|
<ProgressBar
|
||||||
android:id="@+id/tvAmountB"
|
android:id="@+id/pbExchange"
|
||||||
style="@style/MoneroText"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="0sp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_gravity="center"
|
||||||
android:layout_gravity="center|end"
|
android:indeterminate="true"
|
||||||
android:layout_weight="3"
|
android:visibility="invisible" />
|
||||||
android:singleLine="true"
|
</FrameLayout>
|
||||||
android:text="--"
|
|
||||||
android:textAlignment="textEnd"
|
|
||||||
tools:text="87.00000" />
|
|
||||||
|
|
||||||
<Spinner
|
</LinearLayout>
|
||||||
android:id="@+id/sCurrencyB"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:entries="@array/currency"
|
|
||||||
android:gravity="center"
|
|
||||||
android:paddingBottom="8dp"
|
|
||||||
android:paddingTop="8dp"
|
|
||||||
android:textAlignment="center" />
|
|
||||||
|
|
||||||
</merge>
|
</merge>
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginTop="-4dp"
|
android:layout_marginTop="-8dp"
|
||||||
android:src="@drawable/ic_logo_horizontol_xmrujo"
|
android:src="@drawable/ic_logo_horizontol_xmrujo"
|
||||||
android:visibility="visible" />
|
android:visibility="visible" />
|
||||||
|
|
||||||
@ -46,7 +46,6 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginTop="-4dp"
|
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
tools:text="monerujo" />
|
tools:text="monerujo" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -56,11 +56,7 @@
|
|||||||
<item name="android:textColor">@color/moneroGray</item>
|
<item name="android:textColor">@color/moneroGray</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="MoneroLabel.Caps.Stealth">
|
<style name="MoneroLabel.Caps.Gray.Small">
|
||||||
<item name="android:textColor">@color/moneroFab</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="MoneroLabel.Caps.Stealth.Small">
|
|
||||||
<item name="android:textSize">12sp</item>
|
<item name="android:textSize">12sp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@ -249,6 +245,16 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<style name="MoneroTextAppearanceSpinnerItemGray" parent="android:TextAppearance.Widget.TextView.SpinnerItem">
|
||||||
|
<item name="android:textColor">@color/moneroGray</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="MoneroSpinnerGray" parent="@style/Widget.AppCompat.Spinner">
|
||||||
|
<item name="android:background">@drawable/backgound_spinner_gray</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="MoneroSpinnerItemGray" parent="android:Widget.TextView.SpinnerItem">
|
||||||
|
<item name="android:textAppearance">@style/MoneroTextAppearanceSpinnerItemGray</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user