Skip to content

Commit d53eeb5

Browse files
committed
Refactored code. | #112.
1 parent f749975 commit d53eeb5

File tree

4 files changed

+7
-12
lines changed

4 files changed

+7
-12
lines changed

FlowCrypt/src/main/res/layout/activity_create_or_import_key.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
android:id="@+id/buttonCreateNewKey"
2727
style="@style/AppWidget.Button.Green"
2828
android:layout_width="0dp"
29-
android:layout_marginTop="48dp"
29+
android:layout_marginTop="@dimen/first_button_padding"
3030
android:alpha="0.5"
3131
android:enabled="false"
3232
android:text="@string/create_a_new_key"

FlowCrypt/src/main/res/layout/fragment_splash.xml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
xmlns:tools="http://schemas.android.com/tools"
1010
android:layout_width="match_parent"
1111
android:layout_height="match_parent"
12-
tools:context="com.flowcrypt.email.ui.activity.fragment.SplashActivityFragment"
13-
tools:showIn="@layout/activity_splash">
12+
tools:context="com.flowcrypt.email.ui.activity.fragment.SplashActivityFragment">
1413

1514
<Button
1615
android:id="@+id/buttonPrivacy"
@@ -72,17 +71,12 @@
7271
app:layout_constraintLeft_toLeftOf="parent"
7372
app:layout_constraintRight_toRightOf="parent"
7473
app:layout_constraintTop_toBottomOf="@+id/imageViewLogo"
75-
app:layout_constraintVertical_bias="0.215"
76-
tools:layout_constraintBottom_creator="1"
77-
tools:layout_constraintLeft_creator="1"
78-
tools:layout_constraintRight_creator="1"
79-
android:layout_marginTop="0dp"/>
74+
app:layout_constraintVertical_bias="0.215" />
8075

8176
<Button
8277
android:id="@+id/buttonSignInWithGmail"
8378
style="@style/AppWidget.Button.White.ConnectAccount"
84-
android:layout_width="320dp"
85-
android:layout_marginTop="48dp"
79+
android:layout_marginTop="@dimen/first_button_padding"
8680
android:drawableStart="@mipmap/ic_gmail"
8781
android:text="@string/continue_with_gmail"
8882
android:theme="@style/AppWidget.Button.White.ConnectAccount"
@@ -96,7 +90,6 @@
9690
<Button
9791
android:id="@+id/buttonOtherEmailProvider"
9892
style="@style/AppWidget.Button.White.ConnectAccount"
99-
android:layout_width="320dp"
10093
android:layout_marginTop="@dimen/default_margin_big"
10194
android:drawableStart="@mipmap/ic_email"
10295
android:text="@string/other_email_provider"

FlowCrypt/src/main/res/values/dimens.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<dimen name="default_single_dip">1dp</dimen>
1515

1616
<dimen name="default_button_height">64dp</dimen>
17+
<dimen name="default_button_width">320dp</dimen>
1718
<dimen name="default_height_for_click">64dp</dimen>
1819

1920
<dimen name="default_margin_small">5dp</dimen>
@@ -55,4 +56,5 @@
5556
<dimen name="layout_height_attachment_item">48dp</dimen>
5657
<dimen name="layout_width_attachment_item">320dp</dimen>
5758
<dimen name="min_height_layout_message_parts">400dp</dimen>
59+
<dimen name="first_button_padding">48dp</dimen>
5860
</resources>

FlowCrypt/src/main/res/values/styles.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</style>
3939

4040
<style name="AppWidget.Button.White.ConnectAccount">
41-
<item name="android:layout_width">wrap_content</item>
41+
<item name="android:layout_width">@dimen/default_button_width</item>
4242
<item name="android:paddingLeft">@dimen/padding_left_main_screen_sign_button</item>
4343
<item name="android:paddingRight">@dimen/padding_right_main_screen_sign_button</item>
4444
<item name="android:drawablePadding">@dimen/drawable_padding_main_screen_sign_button</item>

0 commit comments

Comments
 (0)