mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 12:19:54 +01:00
Private Group List
This commit is contained in:
10
briar-android/res/drawable/ic_contacts.xml
Normal file
10
briar-android/res/drawable/ic_contacts.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:alpha="0.54"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M20,0L4,0v2h16L20,0zM4,24h16v-2L4,22v2zM20,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM12,6.75c1.24,0 2.25,1.01 2.25,2.25s-1.01,2.25 -2.25,2.25S9.75,10.24 9.75,9 10.76,6.75 12,6.75zM17,17L7,17v-1.5c0,-1.67 3.33,-2.5 5,-2.5s5,0.83 5,2.5L17,17z"/>
|
||||
</vector>
|
||||
BIN
briar-android/res/drawable/navigation_drawer_header.png
Normal file
BIN
briar-android/res/drawable/navigation_drawer_header.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<org.briarproject.android.view.BriarRecyclerView
|
||||
android:id="@+id/invitationsView"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<org.briarproject.android.view.BriarRecyclerView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/contactList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<org.briarproject.android.view.BriarRecyclerView
|
||||
android:id="@+id/list"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/contactList"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/list_item_contact"/>
|
||||
app:scrollToEnd="false"/>
|
||||
@@ -15,7 +15,8 @@
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="@dimen/listitem_horizontal_margin"/>
|
||||
android:layout_marginRight="@dimen/listitem_horizontal_margin"
|
||||
android:layout_marginTop="@dimen/listitem_horizontal_margin"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
||||
android:id="@+id/forumNameView"
|
||||
|
||||
107
briar-android/res/layout/list_item_group.xml
Normal file
107
briar-android/res/layout/list_item_group.xml
Normal file
@@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/listitem_horizontal_margin"
|
||||
android:layout_marginStart="@dimen/listitem_horizontal_margin"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<org.briarproject.android.view.TextAvatarView
|
||||
android:id="@+id/avatarView"
|
||||
android:layout_width="@dimen/listitem_picture_frame_size"
|
||||
android:layout_height="@dimen/listitem_picture_frame_size"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
|
||||
android:layout_marginRight="@dimen/listitem_horizontal_margin"
|
||||
android:layout_marginTop="@dimen/listitem_horizontal_margin"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
||||
android:id="@+id/nameView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginTop="@dimen/listitem_horizontal_margin"
|
||||
android:layout_toEndOf="@+id/avatarView"
|
||||
android:layout_toRightOf="@+id/avatarView"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/briar_text_primary"
|
||||
android:textSize="@dimen/text_size_medium"
|
||||
tools:text="This is a name of a Private Group"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
||||
android:id="@+id/creatorView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/nameView"
|
||||
android:layout_marginBottom="@dimen/margin_small"
|
||||
android:layout_toEndOf="@+id/avatarView"
|
||||
android:layout_toRightOf="@+id/avatarView"
|
||||
android:paddingTop="@dimen/margin_small"
|
||||
android:textColor="@color/briar_text_secondary"
|
||||
android:textSize="@dimen/text_size_small"
|
||||
tools:text="Created by Santa Claus"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messageCountView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/creatorView"
|
||||
android:layout_marginBottom="@dimen/margin_small"
|
||||
android:layout_toEndOf="@+id/avatarView"
|
||||
android:layout_toRightOf="@+id/avatarView"
|
||||
android:paddingTop="@dimen/margin_small"
|
||||
android:textColor="@color/briar_text_secondary"
|
||||
android:textSize="@dimen/text_size_small"
|
||||
tools:text="1337 messages"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dateView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_below="@+id/creatorView"
|
||||
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
|
||||
android:layout_marginRight="@dimen/listitem_horizontal_margin"
|
||||
android:paddingTop="@dimen/margin_small"
|
||||
android:textColor="@color/briar_text_secondary"
|
||||
android:textSize="@dimen/text_size_small"
|
||||
tools:text="3 weeks ago, 12:00"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/statusView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/messageCountView"
|
||||
android:layout_toEndOf="@+id/avatarView"
|
||||
android:layout_toRightOf="@+id/avatarView"
|
||||
android:paddingTop="@dimen/margin_small"
|
||||
android:textColor="@color/briar_text_tertiary"
|
||||
tools:text="@string/groups_group_is_empty"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/removeButton"
|
||||
style="@style/BriarButtonFlat.Negative"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/divider"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_toRightOf="@+id/statusView"
|
||||
android:text="@string/groups_remove"
|
||||
tools:visibility="gone"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
style="@style/Divider.ForumList"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_below="@+id/statusView"
|
||||
android:layout_marginTop="@dimen/listitem_horizontal_margin"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -1,21 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
<ImageView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:showIn="@layout/navigation_menu">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_gravity="top|center_horizontal"
|
||||
android:layout_margin="@dimen/margin_medium"
|
||||
android:contentDescription="@string/app_name"
|
||||
android:src="@drawable/briar_logo_large"/>
|
||||
|
||||
<View
|
||||
style="@style/Divider.Horizontal"
|
||||
android:layout_gravity="bottom"/>
|
||||
|
||||
</FrameLayout>
|
||||
android:layout_height="100dp"
|
||||
android:contentDescription="@string/app_name"
|
||||
android:scaleType="fitStart"
|
||||
android:src="@drawable/navigation_drawer_header"
|
||||
tools:showIn="@layout/navigation_menu"/>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:showIn="@layout/list_item_forum">
|
||||
|
||||
@@ -11,16 +10,15 @@
|
||||
android:layout_width="@dimen/avatar_forum_size"
|
||||
android:layout_height="@dimen/avatar_forum_size"
|
||||
android:layout_gravity="bottom|left"
|
||||
android:src="@android:color/transparent"
|
||||
app:civ_fill_color="@color/briar_button_positive"/>
|
||||
android:src="@color/briar_button_positive"/>
|
||||
|
||||
<android.support.v7.widget.AppCompatTextView
|
||||
android:id="@+id/textAvatarView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="@dimen/listitem_picture_frame_offset"
|
||||
android:layout_marginTop="@dimen/listitem_picture_frame_offset"
|
||||
android:layout_marginRight="@dimen/listitem_picture_frame_offset_horizontal"
|
||||
android:layout_marginTop="@dimen/listitem_picture_frame_offset_vertical"
|
||||
android:maxLength="1"
|
||||
android:shadowColor="@color/forum_avatar_shadow"
|
||||
android:shadowDx="0"
|
||||
|
||||
12
briar-android/res/menu/groups_list_actions.xml
Normal file
12
briar-android/res/menu/groups_list_actions.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_add_group"
|
||||
android:icon="@drawable/ic_add_white"
|
||||
android:title="@string/groups_add_group_title"
|
||||
app:showAsAction="ifRoom"/>
|
||||
|
||||
</menu>
|
||||
@@ -5,8 +5,12 @@
|
||||
<group android:checkableBehavior="single">
|
||||
<item
|
||||
android:id="@+id/nav_btn_contacts"
|
||||
android:icon="@drawable/ic_contacts_black_24dp"
|
||||
android:icon="@drawable/ic_contacts"
|
||||
android:title="@string/contact_list_button"/>
|
||||
<item
|
||||
android:id="@+id/nav_btn_groups"
|
||||
android:icon="@drawable/ic_group"
|
||||
android:title="@string/groups_button"/>
|
||||
<item
|
||||
android:id="@+id/nav_btn_forums"
|
||||
android:icon="@drawable/ic_forums_black_24dp"
|
||||
@@ -15,6 +19,9 @@
|
||||
android:id="@+id/nav_btn_blogs"
|
||||
android:icon="@drawable/blogs"
|
||||
android:title="@string/blogs_button"/>
|
||||
</group>
|
||||
|
||||
<group android:checkableBehavior="single">
|
||||
<item
|
||||
android:id="@+id/nav_btn_settings"
|
||||
android:icon="@drawable/ic_settings_black_24dp"
|
||||
|
||||
@@ -24,8 +24,9 @@
|
||||
<dimen name="listitem_height_one_line_avatar">56dp</dimen>
|
||||
<dimen name="listitem_picture_size">48dp</dimen>
|
||||
<dimen name="listitem_picture_size_small">23dp</dimen>
|
||||
<dimen name="listitem_picture_frame_size">53dp</dimen>
|
||||
<dimen name="listitem_picture_frame_offset">2dp</dimen>
|
||||
<dimen name="listitem_picture_frame_size">51dp</dimen>
|
||||
<dimen name="listitem_picture_frame_offset_horizontal">1dp</dimen>
|
||||
<dimen name="listitem_picture_frame_offset_vertical">2dp</dimen>
|
||||
<dimen name="listitem_selectable_picture_size">40dp</dimen>
|
||||
<dimen name="avatar_forum_size">48dp</dimen>
|
||||
<dimen name="avatar_border_width">2dp</dimen>
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
<string name="nav_drawer_open_description">Open the navigation drawer</string>
|
||||
<string name="nav_drawer_close_description">Close the navigation drawer</string>
|
||||
<string name="contact_list_button">Contacts</string>
|
||||
<string name="groups_button">Private Groups</string>
|
||||
<string name="forums_button">Forums</string>
|
||||
<string name="blogs_button">Blogs</string>
|
||||
<string name="settings_button">Settings</string>
|
||||
@@ -143,6 +144,18 @@
|
||||
<item quantity="other">%d new contacts added.</item>
|
||||
</plurals>
|
||||
|
||||
<!-- Private Groups -->
|
||||
<string name="groups_list_empty">You are not participating in any groups.\n\nTap the + icon at the top to create a group yourself or ask your contacts to get invited into one of their groups.</string>
|
||||
<string name="groups_created_by">Created by %s</string>
|
||||
<plurals name="messages">
|
||||
<item quantity="one">%d message</item>
|
||||
<item quantity="other">%d messages</item>
|
||||
</plurals>
|
||||
<string name="groups_group_is_empty">This group is empty</string>
|
||||
<string name="groups_group_is_dissolved">This group is dissolved</string>
|
||||
<string name="groups_remove">Remove</string>
|
||||
<string name="groups_add_group_title">Add Private Group</string>
|
||||
|
||||
<!-- Forums -->
|
||||
<string name="no_forums">You don\'t have any forums yet.\n\nWhy don\'t you create a new one yourself by tapping the + icon at the top?\n\nYou can also ask your contacts to share forums with you.</string>
|
||||
<string name="create_forum_title">New Forum</string>
|
||||
|
||||
@@ -93,9 +93,6 @@
|
||||
<style name="BriarAvatar">
|
||||
<item name="civ_border_width">@dimen/avatar_border_width</item>
|
||||
<item name="civ_border_color">@color/briar_primary</item>
|
||||
|
||||
<!-- Remove when we are using 'de.hdodenhof:circleimageview:2.1.0' -->
|
||||
<item name="civ_border_overlay">true</item>
|
||||
</style>
|
||||
|
||||
<style name="NavMenuButton" parent="Widget.AppCompat.Button.Borderless.Colored">
|
||||
|
||||
Reference in New Issue
Block a user