use square colorpicker

This commit is contained in:
tibbi 2021-11-14 10:42:00 +01:00
parent 071767ecc4
commit ce38abf7f8
3 changed files with 5 additions and 11 deletions

View File

@ -56,6 +56,6 @@ android {
} }
dependencies { dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:2f86d76a56' implementation 'com.github.SimpleMobileTools:Simple-Commons:a82ec0a6f3'
implementation "androidx.print:print:1.0.0" implementation "androidx.print:print:1.0.0"
} }

View File

@ -13,6 +13,7 @@ import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
import android.view.WindowManager import android.view.WindowManager
import android.webkit.MimeTypeMap import android.webkit.MimeTypeMap
import android.widget.ImageView
import android.widget.SeekBar import android.widget.SeekBar
import androidx.print.PrintHelper import androidx.print.PrintHelper
import com.simplemobiletools.commons.dialogs.ColorPickerDialog import com.simplemobiletools.commons.dialogs.ColorPickerDialog
@ -502,7 +503,7 @@ class MainActivity : SimpleActivity(), CanvasListener {
private fun setColor(pickedColor: Int) { private fun setColor(pickedColor: Int) {
color = pickedColor color = pickedColor
color_picker.setFillWithStroke(color, config.canvasBackgroundColor.getContrastColor()) color_picker.setFillWithStroke(color, config.canvasBackgroundColor.getContrastColor(), true)
my_canvas.setColor(color) my_canvas.setColor(color)
isEraserOn = false isEraserOn = false
updateEraserState() updateEraserState()

View File

@ -18,6 +18,7 @@
android:id="@+id/save_image_path_label" android:id="@+id/save_image_path_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="@dimen/small_margin"
android:text="@string/path" android:text="@string/path"
android:textSize="@dimen/smaller_text_size" /> android:textSize="@dimen/smaller_text_size" />
@ -25,23 +26,15 @@
android:id="@+id/save_image_path" android:id="@+id/save_image_path"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="@dimen/medium_margin" android:paddingStart="@dimen/small_margin"
android:paddingTop="@dimen/small_margin" android:paddingTop="@dimen/small_margin"
android:paddingEnd="@dimen/small_margin" android:paddingEnd="@dimen/small_margin"
android:paddingBottom="@dimen/activity_margin" /> android:paddingBottom="@dimen/activity_margin" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/save_image_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/filename"
android:textSize="@dimen/smaller_text_size" />
<com.simplemobiletools.commons.views.MyEditText <com.simplemobiletools.commons.views.MyEditText
android:id="@+id/save_image_filename" android:id="@+id/save_image_filename"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/small_margin"
android:layout_marginBottom="@dimen/activity_margin" android:layout_marginBottom="@dimen/activity_margin"
android:singleLine="true" android:singleLine="true"
android:textCursorDrawable="@null" android:textCursorDrawable="@null"