Add back the highlight and sticker tools.

master
Greyson Parrelli 2019-03-21 10:47:59 -07:00
parent 749d096931
commit aa5e32f0ee
24 changed files with 37 additions and 6 deletions

View File

@ -400,7 +400,7 @@
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".scribbles.StickerSelectActivity"
android:theme="@style/TextSecure.ScribbleTheme"
android:theme="@style/TextSecure.DarkTheme"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name="com.theartofdev.edmodo.cropper.CropImageActivity"

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 782 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

View File

@ -57,6 +57,22 @@
android:padding="8dp"
android:src="@drawable/ic_undo_36" />
<ImageView
android:id="@+id/scribble_draw_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="8dp"
android:src="@drawable/ic_marker_36" />
<ImageView
android:id="@+id/scribble_highlight_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="8dp"
android:src="@drawable/ic_highlighter_36" />
<ImageView
android:id="@+id/scribble_text_button"
android:layout_width="wrap_content"
@ -66,12 +82,12 @@
android:src="@drawable/ic_text_36" />
<ImageView
android:id="@+id/scribble_draw_button"
android:id="@+id/scribble_sticker_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="8dp"
android:src="@drawable/ic_marker_36" />
android:src="@drawable/ic_camera_emoji_36" />
<ImageView
android:id="@+id/scribble_confirm_button"

View File

@ -9,15 +9,14 @@
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabBackground="@color/signal_primary"
app:tabBackground="@color/core_grey_90"
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" />
android:layout_weight="1" />
</LinearLayout>

View File

@ -41,7 +41,9 @@ import java.util.Set;
public class ScribbleHud extends InputAwareLayout implements ViewTreeObserver.OnGlobalLayoutListener {
private View drawButton;
private View highlightButton;
private View textButton;
private View stickerButton;
private View undoButton;
private View deleteButton;
private View confirmButton;
@ -110,7 +112,9 @@ public class ScribbleHud extends InputAwareLayout implements ViewTreeObserver.On
setOrientation(VERTICAL);
drawButton = findViewById(R.id.scribble_draw_button);
highlightButton = findViewById(R.id.scribble_highlight_button);
textButton = findViewById(R.id.scribble_text_button);
stickerButton = findViewById(R.id.scribble_sticker_button);
undoButton = findViewById(R.id.scribble_undo_button);
deleteButton = findViewById(R.id.scribble_delete_button);
confirmButton = findViewById(R.id.scribble_confirm_button);
@ -255,7 +259,9 @@ public class ScribbleHud extends InputAwareLayout implements ViewTreeObserver.On
private void presentModeNone() {
drawButton.setVisibility(VISIBLE);
highlightButton.setVisibility(VISIBLE);
textButton.setVisibility(VISIBLE);
stickerButton.setVisibility(VISIBLE);
undoButton.setVisibility(GONE);
deleteButton.setVisibility(GONE);
@ -264,7 +270,9 @@ public class ScribbleHud extends InputAwareLayout implements ViewTreeObserver.On
colorPalette.setVisibility(GONE);
drawButton.setOnClickListener(v -> setMode(Mode.DRAW));
highlightButton.setOnClickListener(v -> setMode(Mode.HIGHLIGHT));
textButton.setOnClickListener(v -> setMode(Mode.TEXT));
stickerButton.setOnClickListener(v -> setMode(Mode.STICKER));
}
private void presentModeDraw() {
@ -274,7 +282,9 @@ public class ScribbleHud extends InputAwareLayout implements ViewTreeObserver.On
colorPalette.setVisibility(VISIBLE);
drawButton.setVisibility(GONE);
highlightButton.setVisibility(GONE);
textButton.setVisibility(GONE);
stickerButton.setVisibility(GONE);
deleteButton.setVisibility(GONE);
@ -289,8 +299,10 @@ public class ScribbleHud extends InputAwareLayout implements ViewTreeObserver.On
colorPalette.setVisibility(VISIBLE);
drawButton.setVisibility(GONE);
highlightButton.setVisibility(GONE);
textButton.setVisibility(GONE);
deleteButton.setVisibility(GONE);
stickerButton.setVisibility(GONE);
colorPicker.setOnColorChangeListener(highlightOnColorChangeListener);
colorPicker.setActiveColor(Color.YELLOW);
@ -304,6 +316,8 @@ public class ScribbleHud extends InputAwareLayout implements ViewTreeObserver.On
textButton.setVisibility(GONE);
drawButton.setVisibility(GONE);
highlightButton.setVisibility(GONE);
stickerButton.setVisibility(GONE);
undoButton.setVisibility(GONE);
colorPicker.setOnColorChangeListener(standardOnColorChangeListener);
@ -315,7 +329,9 @@ public class ScribbleHud extends InputAwareLayout implements ViewTreeObserver.On
confirmButton.setVisibility(VISIBLE);
drawButton.setVisibility(GONE);
highlightButton.setVisibility(GONE);
textButton.setVisibility(GONE);
stickerButton.setVisibility(GONE);
undoButton.setVisibility(GONE);
colorPicker.setVisibility(GONE);
colorPalette.setVisibility(GONE);