mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-02 20:02:03 +00:00
batch invitation
// FREEBIE
This commit is contained in:
committed by
Moxie Marlinspike
parent
4371708fc4
commit
3e798a9863
76
res/layout/contact_filter_toolbar.xml
Normal file
76
res/layout/contact_filter_toolbar.xml
Normal file
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<LinearLayout android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView android:id="@+id/action_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:src="@drawable/ic_search_white_24dp" />
|
||||
|
||||
<LinearLayout android:id="@+id/toggle_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText android:id="@+id/search_view"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="0px"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:hint="@string/contact_selection_activity__enter_name_or_number"
|
||||
android:inputType="textPersonName"
|
||||
style="@style/TextSecure.TitleTextStyle"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.AnimatingToggle
|
||||
android:id="@+id/button_toggle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView android:id="@+id/search_dialpad"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:src="@drawable/ic_dialpad_white_24dp" />
|
||||
|
||||
<ImageView android:id="@+id/search_keyboard"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:src="@drawable/ic_keyboard_white_24dp" />
|
||||
|
||||
<ImageView android:id="@+id/search_clear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:src="@drawable/ic_clear_white_24dp" />
|
||||
|
||||
</org.thoughtcrime.securesms.components.AnimatingToggle>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</merge>
|
||||
@@ -5,94 +5,17 @@
|
||||
android:orientation="vertical"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<org.thoughtcrime.securesms.components.ContactFilterToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_width="match_parent"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="@style/TextSecure.LightActionBar">
|
||||
android:theme="@style/TextSecure.LightActionBar" />
|
||||
|
||||
<LinearLayout android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView android:id="@+id/action_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:src="@drawable/ic_search_white_24dp" />
|
||||
|
||||
<LinearLayout android:id="@+id/toggle_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText android:id="@+id/search_view"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="0px"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:hint="@string/contact_selection_activity__enter_name_or_number"
|
||||
android:inputType="textPersonName"
|
||||
style="@style/TextSecure.TitleTextStyle"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.AnimatingToggle
|
||||
android:id="@+id/button_toggle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView android:id="@+id/search_dialpad"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:src="@drawable/ic_dialpad_white_24dp" />
|
||||
|
||||
<ImageView android:id="@+id/search_keyboard"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:src="@drawable/ic_keyboard_white_24dp" />
|
||||
|
||||
<ImageView android:id="@+id/search_clear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:src="@drawable/ic_clear_white_24dp" />
|
||||
|
||||
</org.thoughtcrime.securesms.components.AnimatingToggle>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
<fragment
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/contact_selection_list_fragment"
|
||||
android:name="org.thoughtcrime.securesms.ContactSelectionListFragment">
|
||||
</fragment>
|
||||
<fragment android:id="@+id/contact_selection_list_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:name="org.thoughtcrime.securesms.ContactSelectionListFragment" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,20 +1,13 @@
|
||||
<?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="32sp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="25dp">
|
||||
|
||||
<TextView android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:textSize="15sp"
|
||||
android:textColor="?contact_selection_header_text"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</RelativeLayout>
|
||||
<TextView android:layout_width="match_parent"
|
||||
android:layout_height="32sp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:textSize="15sp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="25dp"
|
||||
android:textStyle="bold"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android" />
|
||||
|
||||
@@ -35,16 +35,14 @@
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:fontFamily="sans-serif-light" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="10dip"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?contact_selection_label_text"
|
||||
android:fontFamily="sans-serif-light"/>
|
||||
<TextView android:id="@+id/label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="10dip"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:fontFamily="sans-serif-light"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
118
res/layout/invite_activity.xml
Normal file
118
res/layout/invite_activity.xml
Normal file
@@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ScrollView android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:clickable="false">
|
||||
|
||||
<LinearLayout android:layout_gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp"
|
||||
android:background="@color/signal_primary">
|
||||
|
||||
<ImageView android:id="@+id/heart"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:contentDescription="@string/InviteActivity_heart_content_description"
|
||||
android:src="@drawable/love_heart" />
|
||||
|
||||
<TextView android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
android:text="@string/InviteActivity_friends_dont_let_friends_text_unencrypted"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:paddingLeft="10dp"/>
|
||||
|
||||
<EditText android:id="@+id/invite_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minLines="2"
|
||||
tools:text="Let's switch to Signal: http://sgnl.link/asdfdfsa"
|
||||
android:background="@drawable/sent_bubble"
|
||||
android:padding="10dp"
|
||||
android:gravity="top"
|
||||
android:inputType="textShortMessage|textMultiLine"
|
||||
android:textColor="#ff333333"/>
|
||||
|
||||
<LinearLayout android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button android:id="@+id/share_button"
|
||||
android:drawablePadding="10dp"
|
||||
android:drawableLeft="@drawable/ic_share_black_18dp"
|
||||
android:text="@string/InviteActivity_share"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="ButtonStyle" />
|
||||
|
||||
<Button android:id="@+id/sms_button"
|
||||
android:drawableLeft="@drawable/ic_message_black_18dp"
|
||||
android:drawablePadding="10dp"
|
||||
android:text="@string/InviteActivity_send_sms"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="ButtonStyle" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
<LinearLayout android:id="@+id/sms_send_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<org.thoughtcrime.securesms.components.ContactFilterToolbar
|
||||
android:id="@+id/contact_filter"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_width="match_parent"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="@style/TextSecure.LightActionBar" />
|
||||
|
||||
<fragment android:id="@+id/contact_selection_list_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:name="org.thoughtcrime.securesms.ContactSelectionListFragment"
|
||||
tools:layout="@layout/contact_selection_list_fragment"/>
|
||||
|
||||
<LinearLayout android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="right"
|
||||
android:padding="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button android:id="@+id/cancel_sms_button"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/InviteActivity_cancel" />
|
||||
|
||||
<Button android:id="@+id/send_sms_button"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:textColor="@color/signal_primary"
|
||||
android:enabled="false"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Send to 0 friends"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
Reference in New Issue
Block a user