Support for stickers and scribbles
// FREEBIE
BIN
res/drawable-hdpi/ic_brush_white_24dp.png
Normal file
After Width: | Height: | Size: 268 B |
BIN
res/drawable-hdpi/ic_check_white_36dp.png
Normal file
After Width: | Height: | Size: 236 B |
BIN
res/drawable-hdpi/ic_local_dining_white_24dp.png
Normal file
After Width: | Height: | Size: 416 B |
BIN
res/drawable-hdpi/ic_pets_white_24dp.png
Normal file
After Width: | Height: | Size: 443 B |
BIN
res/drawable-hdpi/ic_replay_white_24dp.png
Normal file
After Width: | Height: | Size: 391 B |
BIN
res/drawable-hdpi/ic_tag_faces_white_24dp.png
Normal file
After Width: | Height: | Size: 593 B |
BIN
res/drawable-hdpi/ic_text_fields_white_24dp.png
Normal file
After Width: | Height: | Size: 139 B |
BIN
res/drawable-hdpi/ic_wb_sunny_white_24dp.png
Normal file
After Width: | Height: | Size: 459 B |
BIN
res/drawable-hdpi/ic_work_white_24dp.png
Normal file
After Width: | Height: | Size: 180 B |
BIN
res/drawable-mdpi/ic_brush_white_24dp.png
Normal file
After Width: | Height: | Size: 193 B |
BIN
res/drawable-mdpi/ic_check_white_36dp.png
Normal file
After Width: | Height: | Size: 181 B |
BIN
res/drawable-mdpi/ic_local_dining_white_24dp.png
Normal file
After Width: | Height: | Size: 303 B |
BIN
res/drawable-mdpi/ic_pets_white_24dp.png
Normal file
After Width: | Height: | Size: 304 B |
BIN
res/drawable-mdpi/ic_replay_white_24dp.png
Normal file
After Width: | Height: | Size: 244 B |
BIN
res/drawable-mdpi/ic_tag_faces_white_24dp.png
Normal file
After Width: | Height: | Size: 376 B |
BIN
res/drawable-mdpi/ic_text_fields_white_24dp.png
Normal file
After Width: | Height: | Size: 100 B |
BIN
res/drawable-mdpi/ic_wb_sunny_white_24dp.png
Normal file
After Width: | Height: | Size: 293 B |
BIN
res/drawable-mdpi/ic_work_white_24dp.png
Normal file
After Width: | Height: | Size: 133 B |
BIN
res/drawable-xhdpi/ic_brush_white_24dp.png
Normal file
After Width: | Height: | Size: 315 B |
BIN
res/drawable-xhdpi/ic_check_white_36dp.png
Normal file
After Width: | Height: | Size: 276 B |
BIN
res/drawable-xhdpi/ic_local_dining_white_24dp.png
Normal file
After Width: | Height: | Size: 500 B |
BIN
res/drawable-xhdpi/ic_pets_white_24dp.png
Normal file
After Width: | Height: | Size: 426 B |
BIN
res/drawable-xhdpi/ic_replay_white_24dp.png
Normal file
After Width: | Height: | Size: 457 B |
BIN
res/drawable-xhdpi/ic_tag_faces_white_24dp.png
Normal file
After Width: | Height: | Size: 774 B |
BIN
res/drawable-xhdpi/ic_text_fields_white_24dp.png
Normal file
After Width: | Height: | Size: 105 B |
BIN
res/drawable-xhdpi/ic_wb_sunny_white_24dp.png
Normal file
After Width: | Height: | Size: 449 B |
BIN
res/drawable-xhdpi/ic_work_white_24dp.png
Normal file
After Width: | Height: | Size: 206 B |
BIN
res/drawable-xxhdpi/ic_brush_white_24dp.png
Normal file
After Width: | Height: | Size: 429 B |
BIN
res/drawable-xxhdpi/ic_check_white_36dp.png
Normal file
After Width: | Height: | Size: 334 B |
BIN
res/drawable-xxhdpi/ic_local_dining_white_24dp.png
Normal file
After Width: | Height: | Size: 724 B |
BIN
res/drawable-xxhdpi/ic_pets_white_24dp.png
Normal file
After Width: | Height: | Size: 753 B |
BIN
res/drawable-xxhdpi/ic_replay_white_24dp.png
Normal file
After Width: | Height: | Size: 675 B |
BIN
res/drawable-xxhdpi/ic_tag_faces_white_24dp.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
res/drawable-xxhdpi/ic_text_fields_white_24dp.png
Normal file
After Width: | Height: | Size: 134 B |
BIN
res/drawable-xxhdpi/ic_wb_sunny_white_24dp.png
Normal file
After Width: | Height: | Size: 734 B |
BIN
res/drawable-xxhdpi/ic_work_white_24dp.png
Normal file
After Width: | Height: | Size: 281 B |
BIN
res/drawable-xxxhdpi/ic_brush_white_24dp.png
Normal file
After Width: | Height: | Size: 532 B |
BIN
res/drawable-xxxhdpi/ic_check_white_36dp.png
Normal file
After Width: | Height: | Size: 386 B |
BIN
res/drawable-xxxhdpi/ic_local_dining_white_24dp.png
Normal file
After Width: | Height: | Size: 856 B |
BIN
res/drawable-xxxhdpi/ic_pets_white_24dp.png
Normal file
After Width: | Height: | Size: 927 B |
BIN
res/drawable-xxxhdpi/ic_replay_white_24dp.png
Normal file
After Width: | Height: | Size: 908 B |
BIN
res/drawable-xxxhdpi/ic_tag_faces_white_24dp.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
res/drawable-xxxhdpi/ic_text_fields_white_24dp.png
Normal file
After Width: | Height: | Size: 111 B |
BIN
res/drawable-xxxhdpi/ic_wb_sunny_white_24dp.png
Normal file
After Width: | Height: | Size: 843 B |
BIN
res/drawable-xxxhdpi/ic_work_white_24dp.png
Normal file
After Width: | Height: | Size: 365 B |
17
res/drawable/conversation_attachment_edit.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<size android:height="30dp" android:width="30dp"/>
|
||||
<solid android:color="@color/grey_400_transparent"/>
|
||||
<corners android:bottomLeftRadius="0dp" android:topLeftRadius="0dp" android:topRightRadius="0dp" android:bottomRightRadius="@dimen/message_bubble_corner_radius"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:drawable="@drawable/ic_create_white_24dp"
|
||||
android:left="5dp"
|
||||
android:right="5dp"
|
||||
android:top="5dp"
|
||||
android:bottom="5dp"
|
||||
android:scaleType="centerInside">
|
||||
</item>
|
||||
</layer-list>
|
6
res/drawable/vertical_separator.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle" >
|
||||
<stroke android:width="1dp" android:color="@color/white" />
|
||||
<size android:width="2dp" />
|
||||
</shape>
|
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context="org.thoughtcrime.securesms.components.AudioView">
|
||||
|
||||
<LinearLayout android:id="@+id/audio_widget_container"
|
||||
android:orientation="vertical"
|
||||
|
@@ -40,7 +40,7 @@
|
||||
android:background="?android:windowBackground"
|
||||
android:visibility="gone">
|
||||
|
||||
<org.thoughtcrime.securesms.components.RemovableMediaView
|
||||
<org.thoughtcrime.securesms.components.RemovableEditableMediaView
|
||||
android:id="@+id/removable_media_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -67,13 +67,13 @@
|
||||
android:layout_width="210dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:background="@color/white"
|
||||
android:paddingTop="15dp"
|
||||
android:paddingBottom="15dp"
|
||||
app:widgetBackground="@color/white"
|
||||
app:foregroundTintColor="@color/grey_500"
|
||||
app:backgroundTintColor="@color/white"/>
|
||||
|
||||
</org.thoughtcrime.securesms.components.RemovableMediaView>
|
||||
</org.thoughtcrime.securesms.components.RemovableEditableMediaView>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
8
res/layout/media_view_edit_button.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/edit_image_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|right"
|
||||
android:src="@drawable/conversation_attachment_edit"
|
||||
android:visibility="gone"/>
|
44
res/layout/scribble_activity.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/activity_main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context="org.thoughtcrime.securesms.scribbles.ScribbleActivity">
|
||||
|
||||
<org.thoughtcrime.securesms.scribbles.ScribbleToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"/>
|
||||
|
||||
<FrameLayout android:layout_weight="1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@color/grey_300"
|
||||
android:gravity="center">
|
||||
|
||||
<org.thoughtcrime.securesms.scribbles.widget.ScribbleView
|
||||
android:id="@+id/scribble_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"/>
|
||||
|
||||
<org.thoughtcrime.securesms.scribbles.widget.VerticalSlideColorPicker
|
||||
android:id="@+id/scribble_color_picker"
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="300dp"
|
||||
android:layout_gravity="top|right"
|
||||
android:layout_marginRight="25dp"
|
||||
android:layout_marginTop="20dp"
|
||||
app:pickerBorderWidth="1dp"
|
||||
app:pickerBorderColor="@color/grey_600"
|
||||
app:pickerColors="@array/scribble_colors"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
23
res/layout/scribble_select_sticker_activity.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?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="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.design.widget.TabLayout
|
||||
android:id="@+id/tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:tabBackground="@color/signal_primary"
|
||||
app:tabMode="fixed"/>
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0px"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
6
res/layout/scribble_select_sticker_fragment.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/stickers_recycler_view"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
7
res/layout/scribble_sticker_item.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ImageView android:id="@+id/sticker_image"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:padding="16dp"
|
||||
android:scaleType="centerInside"/>
|
82
res/layout/scribble_toolbar.xml
Normal file
@@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<LinearLayout android:layout_marginLeft="16dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:gravity="left|center_vertical"
|
||||
android:layout_gravity="left">
|
||||
|
||||
<ImageView android:id="@+id/save"
|
||||
android:src="@drawable/ic_check_white_36dp"
|
||||
android:tint="@color/grey_800"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout android:id="@+id/tools_view"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="right"
|
||||
android:animateLayoutChanges="true"
|
||||
android:layout_gravity="right">
|
||||
|
||||
<ImageView android:id="@+id/delete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:padding="7dp"
|
||||
android:tint="@color/grey_800"
|
||||
android:src="@drawable/ic_delete_white_24dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<ImageView android:id="@+id/undo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:padding="7dp"
|
||||
android:visibility="gone"
|
||||
android:tint="@color/grey_800"
|
||||
android:src="@drawable/ic_replay_white_24dp"/>
|
||||
|
||||
<ImageView android:id="@+id/separator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:tint="@color/grey_800"
|
||||
android:src="@drawable/vertical_separator"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<ImageView android:id="@+id/sticker_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:tint="@color/grey_800"
|
||||
android:padding="7dp"
|
||||
android:src="@drawable/ic_tag_faces_white_24dp"/>
|
||||
|
||||
<ImageView android:id="@+id/text_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:tint="@color/grey_800"
|
||||
android:padding="7dp"
|
||||
android:src="@drawable/ic_text_fields_white_24dp"/>
|
||||
|
||||
<ImageView android:id="@+id/brush_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:tint="@color/grey_800"
|
||||
android:padding="7dp"
|
||||
android:src="@drawable/ic_brush_white_24dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
</merge>
|
25
res/layout/scribble_view.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge tools:parentTag="FrameLayout"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView android:id="@+id/image_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="centerInside"
|
||||
android:adjustViewBounds="true"/>
|
||||
|
||||
<org.thoughtcrime.securesms.scribbles.widget.MotionView
|
||||
android:id="@+id/motion_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<org.thoughtcrime.securesms.scribbles.widget.CanvasView
|
||||
android:id="@+id/canvas_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/transparent"/>
|
||||
|
||||
</merge>
|
@@ -253,4 +253,12 @@
|
||||
<item>604800</item>
|
||||
</integer-array>
|
||||
|
||||
<array name="scribble_colors">
|
||||
<item>#000000</item>
|
||||
<item>#ff0000</item>
|
||||
<item>#ffff00</item>
|
||||
<item>#00ffff</item>
|
||||
<item>#ff00ff</item>
|
||||
</array>
|
||||
|
||||
</resources>
|
||||
|
@@ -154,6 +154,7 @@
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="AudioView">
|
||||
<attr name="widgetBackground" format="color"/>
|
||||
<attr name="foregroundTintColor" format="color" />
|
||||
<attr name="backgroundTintColor" format="color" />
|
||||
</declare-styleable>
|
||||
@@ -183,4 +184,10 @@
|
||||
<attr name="square_height" format="boolean"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="VerticalSlideColorPicker">
|
||||
<attr name="pickerBorderColor" format="color" />
|
||||
<attr name="pickerBorderWidth" format="dimension" />
|
||||
<attr name="pickerColors" format="reference" />
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
|
@@ -52,4 +52,7 @@
|
||||
<color name="import_export_item_background_shadow_dark">#ff222222</color>
|
||||
<color name="import_export_touch_highlight_light">#400099cc</color>
|
||||
<color name="import_export_touch_highlight_dark">#40ffffff</color>
|
||||
|
||||
<color name="sticker_selected_color">#8cf437</color>
|
||||
<color name="transparent">#00FFFFFF</color>
|
||||
</resources>
|
||||
|
@@ -25,6 +25,7 @@
|
||||
<dimen name="media_bubble_height">210dp</dimen>
|
||||
<dimen name="media_bubble_border_width">3dp</dimen>
|
||||
<dimen name="media_bubble_remove_button_size">24dp</dimen>
|
||||
<dimen name="media_bubble_edit_button_size">24dp</dimen>
|
||||
|
||||
<integer name="media_overview_cols">3</integer>
|
||||
<dimen name="message_details_table_row_pad">10dp</dimen>
|
||||
@@ -63,4 +64,6 @@
|
||||
<dimen name="onboarding_watermark_size">140dp</dimen>
|
||||
<dimen name="onboarding_title_size">34sp</dimen>
|
||||
<dimen name="onboarding_subtitle_size">20sp</dimen>
|
||||
|
||||
<dimen name="scribble_stroke_size">3dp</dimen>
|
||||
</resources>
|
||||
|
@@ -273,4 +273,6 @@
|
||||
<color name="grey_800">#424242</color>
|
||||
<color name="grey_900">#212121</color>
|
||||
|
||||
<color name="grey_400_transparent">#44BDBDBD</color>
|
||||
|
||||
</resources>
|