Commit 1bfb547d authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Adds proper styles.

parent e6ecb84b
......@@ -15,7 +15,7 @@
<TextView
android:id="@+id/text_headline"
style="@style/HeadlineTextView"
style="@style/Authentication.Headline.TextView"
android:text="@string/title_log_in"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
......@@ -23,7 +23,7 @@
<EditText
android:id="@+id/text_username_or_email"
style="@style/EditText.Authentication"
style="@style/Authentication.EditText"
android:layout_marginTop="32dp"
android:drawableStart="@drawable/ic_assignment_ind_black_24dp"
android:hint="@string/msg_username_or_email"
......@@ -35,7 +35,7 @@
<EditText
android:id="@+id/text_password"
style="@style/EditText.Authentication"
style="@style/Authentication.EditText"
android:layout_marginTop="16dp"
android:drawableStart="@drawable/ic_lock_black_24dp"
android:hint="@string/msg_password"
......@@ -193,7 +193,7 @@
<Button
android:id="@+id/button_log_in"
style="@style/AuthenticationButton"
style="@style/Authentication.Button"
android:text="@string/title_log_in"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
......
......@@ -10,13 +10,13 @@
<TextView
android:id="@+id/text_headline"
style="@style/HeadlineTextView"
style="@style/Authentication.Headline.TextView"
android:layout_centerHorizontal="true"
android:text="@string/title_sign_in_your_server" />
<TextView
android:id="@+id/text_server_protocol"
style="@style/AuthenticationLabel"
style="@style/Authentication.TextView"
android:layout_below="@id/text_headline"
android:layout_marginTop="32dp"
android:gravity="center_vertical"
......@@ -24,7 +24,7 @@
<EditText
android:id="@+id/text_server_url"
style="@style/EditText.Authentication"
style="@style/Authentication.EditText"
android:layout_below="@id/text_headline"
android:layout_marginStart="0dp"
android:layout_marginTop="32dp"
......@@ -48,7 +48,7 @@
<Button
android:id="@+id/button_connect"
style="@style/AuthenticationButton"
style="@style/Authentication.Button"
android:layout_alignParentBottom="true"
android:text="@string/action_connect" />
......
......@@ -9,7 +9,7 @@
<TextView
android:id="@+id/text_headline"
style="@style/HeadlineTextView"
style="@style/Authentication.Headline.TextView"
android:text="@string/title_sign_up"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
......@@ -17,7 +17,7 @@
<EditText
android:id="@+id/text_name"
style="@style/EditText.Authentication"
style="@style/Authentication.EditText"
android:layout_marginTop="32dp"
android:drawableStart="@drawable/ic_person_black_24dp"
android:hint="@string/msg_name"
......@@ -29,7 +29,7 @@
<EditText
android:id="@+id/text_username"
style="@style/EditText.Authentication"
style="@style/Authentication.EditText"
android:layout_marginTop="16dp"
android:drawableStart="@drawable/ic_at_black_24dp"
android:hint="@string/msg_username"
......@@ -41,7 +41,7 @@
<EditText
android:id="@+id/text_password"
style="@style/EditText.Authentication"
style="@style/Authentication.EditText"
android:layout_marginTop="16dp"
android:drawableStart="@drawable/ic_lock_black_24dp"
android:hint="@string/msg_password"
......@@ -53,7 +53,7 @@
<EditText
android:id="@+id/text_email"
style="@style/EditText.Authentication"
style="@style/Authentication.EditText"
android:layout_marginTop="16dp"
android:drawableStart="@drawable/ic_email_black_24dp"
android:hint="@string/msg_email"
......@@ -91,7 +91,7 @@
<Button
android:id="@+id/button_sign_up"
style="@style/AuthenticationButton"
style="@style/Authentication.Button"
android:text="@string/title_sign_up"
app:layout_constraintBottom_toBottomOf="parent" />
......
......@@ -8,13 +8,13 @@
<TextView
android:id="@+id/text_headline"
style="@style/HeadlineTextView"
style="@style/Authentication.Headline.TextView"
android:layout_centerHorizontal="true"
android:text="@string/title_log_in" />
<EditText
android:id="@+id/text_two_factor_auth"
style="@style/EditText.Authentication"
style="@style/Authentication.EditText"
android:layout_below="@id/text_headline"
android:layout_marginTop="32dp"
android:drawableStart="@drawable/ic_vpn_key_black_24dp"
......@@ -33,7 +33,7 @@
<Button
android:id="@+id/button_log_in"
style="@style/AuthenticationButton"
style="@style/Authentication.Button"
android:layout_alignParentBottom="true"
android:text="@string/title_log_in" />
......
......@@ -25,7 +25,7 @@
<EditText
android:id="@+id/text_name"
style="@style/EditText.Profile"
style="@style/Profile.EditText"
android:layout_marginTop="32dp"
android:drawableStart="@drawable/ic_person_black_24dp"
android:hint="@string/msg_name"
......@@ -33,7 +33,7 @@
<EditText
android:id="@+id/text_username"
style="@style/EditText.Profile"
style="@style/Profile.EditText"
android:layout_marginTop="16dp"
android:drawableStart="@drawable/ic_at_black_24dp"
android:hint="@string/msg_username"
......@@ -41,7 +41,7 @@
<EditText
android:id="@+id/text_email"
style="@style/EditText.Profile"
style="@style/Profile.EditText"
android:layout_marginTop="16dp"
android:drawableStart="@drawable/ic_email_black_24dp"
android:hint="@string/msg_email"
......
......@@ -28,13 +28,10 @@
<TextView
android:id="@+id/text_chat_name"
style="@style/TextAppearance.AppCompat.Title"
style="@style/ChatRoom.Name.TextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:alpha="0.6"
android:ellipsize="end"
android:maxLines="1"
android:textSize="16sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/text_last_message_date_time"
app:layout_constraintTop_toTopOf="parent"
......@@ -42,11 +39,10 @@
<TextView
android:id="@+id/text_last_message_date_time"
style="@style/TextAppearance.AppCompat.Caption"
style="@style/Timestamp.TextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:textSize="10sp"
app:layout_constraintBaseline_toBaselineOf="@+id/text_chat_name"
app:layout_constraintLeft_toRightOf="@+id/text_chat_name"
app:layout_constraintRight_toRightOf="parent"
......@@ -80,9 +76,9 @@
android:layout_width="18dp"
android:layout_height="18dp"
android:layout_marginStart="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@+id/text_last_message"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
app:layout_constraintRight_toRightOf="parent" />
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
......@@ -28,31 +28,26 @@
<TextView
android:id="@+id/text_sender"
style="@style/TextAppearance.AppCompat.Title"
style="@style/Sender.Name.TextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:textSize="16sp"
tools:text="Ronald Perkins" />
<TextView
android:id="@+id/text_message_time"
style="@style/TextAppearance.AppCompat.Caption"
style="@style/Timestamp.TextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:textSize="10sp"
tools:text="11:45 pm" />
tools:text="11:45 PM" />
</LinearLayout>
<TextView
android:id="@+id/text_content"
style="@style/Message.TextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:textColor="@color/colorPrimaryText"
android:textSize="15sp"
app:layout_constraintLeft_toLeftOf="@id/top_container"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/top_container"
......
......@@ -17,7 +17,18 @@
</style>
<!-- Widget styles. -->
<style name="HeadlineTextView" parent="TextAppearance.AppCompat.Headline">
<style name="Authentication.TextView" parent="TextAppearance.AppCompat.Medium">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">50dp</item>
<item name="android:layout_marginStart">@dimen/screen_edge_left_and_right_margins</item>
<item name="android:paddingStart">@dimen/edit_text_margin</item>
<item name="android:maxLines">1</item>
<item name="android:drawablePadding">@dimen/edit_text_drawable_padding</item>
<item name="android:fontFamily">sans-serif</item>
<item name="android:background">@drawable/style_edit_text_authentication</item>
</style>
<style name="Authentication.Headline.TextView" parent="TextAppearance.AppCompat.Headline">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginTop">20dp</item>
......@@ -25,7 +36,7 @@
<item name="android:layout_marginEnd">@dimen/screen_edge_left_and_right_margins</item>
</style>
<style name="EditText.Authentication" parent="Widget.AppCompat.EditText">
<style name="Authentication.EditText" parent="Widget.AppCompat.EditText">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">50dp</item>
<item name="android:layout_marginStart">@dimen/screen_edge_left_and_right_margins</item>
......@@ -39,25 +50,35 @@
<item name="android:background">@drawable/style_edit_text_authentication</item>
</style>
<style name="EditText.Profile" parent="EditText.Authentication">
<item name="android:background">@drawable/style_edit_text_profile</item>
<style name="Authentication.Button" parent="Widget.AppCompat.Button">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:background">@drawable/effect_ripple</item>
</style>
<style name="AuthenticationLabel" parent="TextAppearance.AppCompat.Medium">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">50dp</item>
<item name="android:layout_marginStart">@dimen/screen_edge_left_and_right_margins</item>
<item name="android:paddingStart">@dimen/edit_text_margin</item>
<style name="ChatRoom.Name.TextView" parent="TextAppearance.AppCompat.Title">
<item name="android:ellipsize">end</item>
<item name="android:maxLines">1</item>
<item name="android:drawablePadding">@dimen/edit_text_drawable_padding</item>
<item name="android:fontFamily">sans-serif</item>
<item name="android:background">@drawable/style_edit_text_authentication</item>
<item name="textSize">16sp</item>
</style>
<style name="AuthenticationButton" parent="Widget.AppCompat.Button">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:background">@drawable/effect_ripple</item>
<style name="Sender.Name.TextView" parent="TextAppearance.AppCompat.Title">
<item name="android:ellipsize">end</item>
<item name="android:maxLines">1</item>
<item name="android:textSize">16sp</item>
</style>
<style name="Message.TextView" parent="Widget.AppCompat.EditText">
<item name="android:textSize">15sp</item>
<item name="android:textColor">@color/colorPrimaryText</item>
</style>
<style name="Timestamp.TextView" parent="TextAppearance.AppCompat.Caption">
<item name="android:textSize">10sp</item>
</style>
<style name="Profile.EditText" parent="Authentication.EditText">
<item name="android:background">@drawable/style_edit_text_profile</item>
</style>
</resources>
\ No newline at end of file
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