mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-19 10:32:18 +00:00
Support for stickers and scribbles
// FREEBIE
This commit is contained in:
@@ -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
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
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
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
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
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
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
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>
|
Reference in New Issue
Block a user