Add Direct Message to visibility panel
This commit is contained in:
parent
18d5d0152c
commit
d6a66656de
7 changed files with 71 additions and 5 deletions
|
@ -73,10 +73,14 @@ public class ComposeOptionsFragment extends BottomSheetDialogFragment {
|
|||
radioCheckedId = R.id.radio_unlisted;
|
||||
}
|
||||
if (statusVisibility != null) {
|
||||
if (statusVisibility.equals("unlisted")) {
|
||||
radioCheckedId = R.id.radio_unlisted;
|
||||
if (statusVisibility.equals("public")) {
|
||||
radioCheckedId = R.id.radio_public;
|
||||
} else if (statusVisibility.equals("private")) {
|
||||
radioCheckedId = R.id.radio_private;
|
||||
} else if (statusVisibility.equals("unlisted")) {
|
||||
radioCheckedId = R.id.radio_unlisted;
|
||||
} else if (statusVisibility.equals("direct")) {
|
||||
radioCheckedId = R.id.radio_direct;
|
||||
}
|
||||
}
|
||||
radio.check(radioCheckedId);
|
||||
|
@ -113,6 +117,10 @@ public class ComposeOptionsFragment extends BottomSheetDialogFragment {
|
|||
visibility = "private";
|
||||
break;
|
||||
}
|
||||
case R.id.radio_direct: {
|
||||
visibility = "direct";
|
||||
break;
|
||||
}
|
||||
}
|
||||
listener.onVisibilityChanged(visibility);
|
||||
}
|
||||
|
|
5
app/src/main/res/color/drawer_visibility_panel_item.xml
Normal file
5
app/src/main/res/color/drawer_visibility_panel_item.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/button_dark" android:state_checked="true" />
|
||||
<item android:color="@color/color_primary_dark" />
|
||||
</selector>
|
9
app/src/main/res/drawable/ic_email_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_email_24dp.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="@color/toolbar_icon_dark"
|
||||
android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z" />
|
||||
</vector>
|
9
app/src/main/res/drawable/ic_lock_open_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_lock_open_24dp.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="@color/toolbar_icon_dark"
|
||||
android:pathData="M12,17c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6h1.9c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM18,20L6,20L6,10h12v10z" />
|
||||
</vector>
|
9
app/src/main/res/drawable/ic_lock_outline_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_lock_outline_24dp.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="@color/toolbar_icon_dark"
|
||||
android:pathData="M12,17c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1s3.1,1.39 3.1,3.1v2L8.9,8L8.9,6zM18,20L6,20L6,10h12v10z" />
|
||||
</vector>
|
|
@ -15,23 +15,48 @@
|
|||
|
||||
<RadioButton
|
||||
android:text="@string/visibility_public"
|
||||
android:button="@drawable/ic_public_24dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/radio_public"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:buttonTint="@color/drawer_visibility_panel_item"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<RadioButton
|
||||
android:text="@string/visibility_unlisted"
|
||||
android:button="@drawable/ic_lock_open_24dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/radio_unlisted"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:buttonTint="@color/drawer_visibility_panel_item"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<RadioButton
|
||||
android:text="@string/visibility_private"
|
||||
android:button="@drawable/ic_lock_outline_24dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/radio_private"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:buttonTint="@color/drawer_visibility_panel_item"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<RadioButton
|
||||
android:text="@string/visibility_direct"
|
||||
android:button="@drawable/ic_email_24dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/radio_direct"
|
||||
android:layout_marginTop="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:buttonTint="@color/drawer_visibility_panel_item"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</RadioGroup>
|
||||
|
|
|
@ -111,9 +111,10 @@
|
|||
<string name="dialog_title_finishing_media_upload">Finishing Media Upload</string>
|
||||
<string name="dialog_message_uploading_media">Uploading…</string>
|
||||
|
||||
<string name="visibility_public">Everyone can view</string>
|
||||
<string name="visibility_unlisted">Everyone can view, but not on public timelines</string>
|
||||
<string name="visibility_private">Only followers and mentions can view</string>
|
||||
<string name="visibility_public">Public: Post to public timelines</string>
|
||||
<string name="visibility_unlisted">Unlisted: Do not show in public timelines</string>
|
||||
<string name="visibility_private">Private: Post to followers only</string>
|
||||
<string name="visibility_direct">Direct: Post to mentioned users only</string>
|
||||
|
||||
<string name="pref_title_notification_settings">Notifications</string>
|
||||
<string name="pref_title_edit_notification_settings">Edit Notifications</string>
|
||||
|
|
Loading…
Reference in a new issue