Implement rough home screen redesign

This commit is contained in:
Niels Andriesse
2019-12-17 14:27:59 +01:00
parent d4db46aeca
commit a10c056ac5
21 changed files with 292 additions and 15 deletions

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient android:type="radial" android:gradientRadius="36dp" android:startColor="@color/accent" android:endColor="@android:color/transparent" />
</shape>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/accent" />
</shape>

BIN
res/font/roboto_light.ttf Normal file

Binary file not shown.

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- The button below intentionally uses dp for the text size and not sp -->
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="72dp">
<View
android:layout_width="72dp"
android:layout_height="72dp"
android:background="@drawable/new_conversation_button_background" />
<Button
android:layout_width="@dimen/new_conversation_button_size"
android:layout_height="@dimen/new_conversation_button_size"
android:layout_centerInParent="true"
android:paddingLeft="1dp"
android:paddingBottom="2dp"
android:background="@drawable/new_conversation_button_foreground"
android:fontFamily="@font/roboto_light"
android:textSize="40dp"
android:textColor="#121212"
android:text="+"
android:elevation="0dp" />
</RelativeLayout>
</RelativeLayout>

View File

@@ -21,7 +21,7 @@
android:textColor="@color/text"
android:text="Your Session begins here..." />
<org.thoughtcrime.securesms.loki.redesign.FakeChatView
<org.thoughtcrime.securesms.loki.redesign.views.FakeChatView
android:id="@+id/fakeChatView"
android:layout_width="match_parent"
android:layout_height="@dimen/fake_chat_view_height"

View File

@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.loki.redesign.views.ConversationView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/cell_background"
android:orientation="horizontal"
android:gravity="center_vertical">
<View
android:id="@+id/unreadMessagesIndicatorView"
android:layout_width="@dimen/accent_line_thickness"
android:layout_height="match_parent"
android:background="@color/accent" />
<View
android:layout_width="@dimen/medium_profile_picture_size"
android:layout_height="@dimen/medium_profile_picture_size"
android:layout_marginTop="@dimen/medium_spacing"
android:layout_marginLeft="@dimen/medium_spacing"
android:layout_marginBottom="@dimen/medium_spacing"
android:background="@color/unimportant" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/medium_spacing"
android:layout_marginRight="@dimen/medium_spacing"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/displayNameTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/medium_font_size"
android:textStyle="bold"
android:textColor="@color/text"
android:text="Spiderman" />
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />
<TextView
android:id="@+id/timestampTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/medium_spacing"
android:textSize="@dimen/small_font_size"
android:textColor="@color/text"
android:alpha="0.4"
android:text="9:41 AM" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/snippetTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/medium_font_size"
android:textColor="@color/text"
android:text="Sorry, gotta go fight crime again" />
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />
<View
android:id="@+id/statusIndicatorImageView"
android:layout_width="@dimen/conversation_view_status_indicator_size"
android:layout_height="@dimen/conversation_view_status_indicator_size"
android:layout_marginLeft="@dimen/medium_spacing" />
</LinearLayout>
</LinearLayout>
</org.thoughtcrime.securesms.loki.redesign.views.ConversationView>

View File

@@ -4,6 +4,9 @@
<!-- Session -->
<color name="accent">#00F782</color>
<color name="text">#FFFFFF</color>
<color name="unimportant">#D8D8D8</color>
<color name="cell_background">#1B1B1B</color>
<color name="cell_selected">#0C0C0C</color>
<color name="action_bar_background">#171717</color>
<color name="navigation_bar_background">#121212</color>
<color name="fake_chat_bubble_background">#3F4146</color>

View File

@@ -13,7 +13,11 @@
<!-- Element Sizes -->
<dimen name="medium_button_height">48dp</dimen>
<dimen name="accent_line_thickness">4dp</dimen>
<dimen name="medium_profile_picture_size">45dp</dimen>
<dimen name="conversation_view_status_indicator_size">14dp</dimen>
<dimen name="border_thickness">2dp</dimen>
<dimen name="new_conversation_button_size">56dp</dimen>
<dimen name="text_view_corner_radius">8dp</dimen>
<dimen name="fake_chat_view_bubble_width">224dp</dimen>
<dimen name="fake_chat_view_bubble_corner_radius">10dp</dimen>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Loki Messenger</string>
<string name="app_name">Session</string>
<string name="install_url" translatable="false">https://signal.org/install</string>
<string name="yes">Yes</string>
<string name="no">No</string>

View File

@@ -5,6 +5,13 @@
<style name="Session.DarkActionBar" parent="@style/Widget.AppCompat.ActionBar">
<item name="background">@color/action_bar_background</item>
<item name="android:background">@color/action_bar_background</item>
<item name="titleTextStyle">@style/Session.TitleTextStyle</item>
<item name="android:titleTextStyle">@style/Session.TitleTextStyle</item>
</style>
<style name="Session.TitleTextStyle" parent="TextAppearance.AppCompat.Widget.ActionBar.Title">
<item name="android:textColor">@color/text</item>
<item name="android:textSize">@dimen/very_large_font_size</item>
</style>
<style name="MediumProminentFilledButton">