mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-25 18:29:01 +00:00
Implement open group suggestion sheet
This commit is contained in:
11
res/drawable/default_bottom_sheet_background.xml
Normal file
11
res/drawable/default_bottom_sheet_background.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="@color/dialog_background" />
|
||||
|
||||
<corners android:topLeftRadius="24dp" android:topRightRadius="24dp" />
|
||||
|
||||
<stroke android:width="@dimen/border_thickness" android:color="@color/dialog_border" />
|
||||
</shape>
|
8
res/drawable/default_bottom_sheet_background_inset.xml
Normal file
8
res/drawable/default_bottom_sheet_background_inset.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<inset
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/default_bottom_sheet_background"
|
||||
android:insetLeft="-2dp"
|
||||
android:insetRight="-2dp"
|
||||
android:insetBottom="-2dp">
|
||||
</inset>
|
37
res/drawable/ic_chat_bubbles.xml
Normal file
37
res/drawable/ic_chat_bubbles.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="129dp"
|
||||
android:height="89dp"
|
||||
android:viewportWidth="129"
|
||||
android:viewportHeight="89">
|
||||
<path
|
||||
android:pathData="M84.282,21C108.03,21 127.282,35.775 127.282,54C127.282,60.581 124.772,66.712 120.446,71.86C120.387,74.448 122.309,78.125 126.213,82.89C122.04,82.593 118.037,82.029 114.202,81.199C112.522,80.835 111.249,80.511 110.382,80.226C103.147,84.476 94.098,87 84.282,87C60.534,87 41.282,72.225 41.282,54C41.282,35.775 60.534,21 84.282,21Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="3"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#02D370"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M33.282,1C50.403,1 64.282,11.969 64.282,25.5C64.282,39.031 50.403,50 33.282,50C26.123,50 19.531,48.082 14.283,44.861C13.67,45.098 12.651,45.376 11.226,45.693C8.462,46.309 5.576,46.728 2.568,46.949C5.767,42.926 7.12,39.948 6.627,38.015C3.867,34.353 2.282,30.073 2.282,25.5C2.282,11.969 16.161,1 33.282,1Z"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#161616"/>
|
||||
<path
|
||||
android:pathData="M64,54m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#02D370"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="M84,54m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#02D370"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
<path
|
||||
android:pathData="M100,54a3.5,4 0,1 0,7 0a3.5,4 0,1 0,-7 0z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#02D370"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
</vector>
|
63
res/layout/fragment_open_group_suggestion_bottom_sheet.xml
Normal file
63
res/layout/fragment_open_group_suggestion_bottom_sheet.xml
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="@dimen/large_spacing"
|
||||
app:behavior_hideable="true"
|
||||
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
|
||||
android:background="@drawable/default_bottom_sheet_background_inset">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_chat_bubbles" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/large_spacing"
|
||||
android:text="No messages yet"
|
||||
android:textColor="@color/text"
|
||||
android:textStyle="bold"
|
||||
android:textSize="@dimen/large_font_size" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/large_spacing"
|
||||
android:text="Would you like to join the Session Public Chat?"
|
||||
android:textColor="@color/text"
|
||||
android:textSize="@dimen/medium_font_size"
|
||||
android:textAlignment="center" />
|
||||
|
||||
<Button
|
||||
style="@style/MediumProminentOutlineButton"
|
||||
android:id="@+id/joinButton"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="@dimen/medium_button_height"
|
||||
android:layout_marginTop="@dimen/large_spacing"
|
||||
android:text="Join Public Chat" />
|
||||
|
||||
<Button
|
||||
style="@style/MediumUnimportantOutlineButton"
|
||||
android:id="@+id/dismissButton"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="@dimen/medium_button_height"
|
||||
android:layout_marginTop="@dimen/medium_spacing"
|
||||
android:text="No, thank you" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_spacing"
|
||||
android:textSize="@dimen/very_small_font_size"
|
||||
android:textColor="@color/text"
|
||||
android:alpha="0.6"
|
||||
android:textAlignment="center"
|
||||
android:text="Open groups can be joined by anyone and do not provide full metadata protection" />
|
||||
|
||||
</LinearLayout>
|
@@ -49,6 +49,14 @@
|
||||
<item name="buttonBarPositiveButtonStyle">@style/Session.AlertDialog.PositiveButtonStyle</item>
|
||||
</style>
|
||||
|
||||
<style name="SessionBottomSheetDialogTheme" parent="Theme.Design.Light.BottomSheetDialog">
|
||||
<item name="bottomSheetStyle">@style/SessionBottomSheetStyle</item>
|
||||
</style>
|
||||
|
||||
<style name="SessionBottomSheetStyle" parent="Widget.Design.BottomSheet.Modal">
|
||||
<item name="android:background">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="Session.AlertDialog.NegativeButtonStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
|
||||
<item name="android:textColor">@color/accent</item>
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user