mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-27 17:08:34 +03:00
Add crop and low res (2MP) drawables
Signed-off-by: Adam Serbinski <adam@serbinski.com>
This commit is contained in:
parent
13d376b25b
commit
7edd87fa4e
5 changed files with 28 additions and 6 deletions
|
@ -113,8 +113,8 @@ public class TakePhotoActivity extends AppCompatActivity {
|
||||||
|
|
||||||
binding.toggleCrop.setOnClickListener((v) -> {
|
binding.toggleCrop.setOnClickListener((v) -> {
|
||||||
crop = !crop;
|
crop = !crop;
|
||||||
binding.toggleCrop.setIcon(ContextCompat.getDrawable(this, crop ?
|
binding.toggleCrop.setBackgroundColor(crop ? getResources().getColor(R.color.colorPrimary) :
|
||||||
R.drawable.ic_baseline_flash_on_24 : R.drawable.ic_baseline_flash_off_24));
|
getResources().getColor(R.color.camera_bg_tint));
|
||||||
cameraProvider.unbindAll();
|
cameraProvider.unbindAll();
|
||||||
camera = cameraProvider.bindToLifecycle(
|
camera = cameraProvider.bindToLifecycle(
|
||||||
this,
|
this,
|
||||||
|
@ -125,8 +125,8 @@ public class TakePhotoActivity extends AppCompatActivity {
|
||||||
|
|
||||||
binding.toggleLowres.setOnClickListener((v) -> {
|
binding.toggleLowres.setOnClickListener((v) -> {
|
||||||
lowres = !lowres;
|
lowres = !lowres;
|
||||||
binding.toggleLowres.setIcon(ContextCompat.getDrawable(this, lowres ?
|
binding.toggleLowres.setBackgroundColor(lowres ? getResources().getColor(R.color.colorPrimary) :
|
||||||
R.drawable.ic_baseline_flash_on_24 : R.drawable.ic_baseline_flash_off_24));
|
getResources().getColor(R.color.camera_bg_tint));
|
||||||
cameraProvider.unbindAll();
|
cameraProvider.unbindAll();
|
||||||
camera = cameraProvider.bindToLifecycle(
|
camera = cameraProvider.bindToLifecycle(
|
||||||
this,
|
this,
|
||||||
|
|
10
app/src/main/res/drawable/ic_2mp_24dp.xml
Normal file
10
app/src/main/res/drawable/ic_2mp_24dp.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="#757575" >
|
||||||
|
<path
|
||||||
|
android:pathData="M19,3L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM12,18.5h-1.5L10.5,14h-1v3L8,17v-3L7,14v4.5L5.5,18.5v-5c0,-0.55 0.45,-1 1,-1L11,12.5c0.55,0 1,0.45 1,1v5zM15.5,18.5L14,18.5v-6h3.5c0.55,0 1,0.45 1,1L18.5,16c0,0.55 -0.45,1 -1,1h-2v1.5zM13.5,9h-2v1h3v1.5L10,11.5L10,9c0,-0.55 0.45,-1 1,-1h2L13,7h-3L10,5.5h3.5c0.55,0 1,0.45 1,1L14.5,8c0,0.55 -0.45,1 -1,1zM15.5,14L17,14v1.5h-1.5z"
|
||||||
|
android:fillColor="@android:color/white"/>
|
||||||
|
</vector>
|
10
app/src/main/res/drawable/ic_crop_16_9_24dp.xml
Normal file
10
app/src/main/res/drawable/ic_crop_16_9_24dp.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="#757575">
|
||||||
|
<path
|
||||||
|
android:pathData="M19,6L5,6c-1.1,0 -2,0.9 -2,2v8c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,8c0,-1.1 -0.9,-2 -2,-2zM19,16L5,16L5,8h14v8z"
|
||||||
|
android:fillColor="@android:color/white"/>
|
||||||
|
</vector>
|
|
@ -63,7 +63,7 @@
|
||||||
app:backgroundTint="#99121212"
|
app:backgroundTint="#99121212"
|
||||||
app:cornerRadius="@dimen/button_corner_radius"
|
app:cornerRadius="@dimen/button_corner_radius"
|
||||||
app:elevation="0dp"
|
app:elevation="0dp"
|
||||||
app:icon="@drawable/ic_baseline_flash_off_24"
|
app:icon="@drawable/ic_crop_16_9_24dp"
|
||||||
app:iconGravity="textStart"
|
app:iconGravity="textStart"
|
||||||
app:iconPadding="0dp"
|
app:iconPadding="0dp"
|
||||||
app:iconSize="24dp"
|
app:iconSize="24dp"
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
app:backgroundTint="#99121212"
|
app:backgroundTint="#99121212"
|
||||||
app:cornerRadius="@dimen/button_corner_radius"
|
app:cornerRadius="@dimen/button_corner_radius"
|
||||||
app:elevation="0dp"
|
app:elevation="0dp"
|
||||||
app:icon="@drawable/ic_baseline_flash_off_24"
|
app:icon="@drawable/ic_2mp_24dp"
|
||||||
app:iconGravity="textStart"
|
app:iconGravity="textStart"
|
||||||
app:iconPadding="0dp"
|
app:iconPadding="0dp"
|
||||||
app:iconSize="24dp"
|
app:iconSize="24dp"
|
||||||
|
|
|
@ -89,4 +89,6 @@
|
||||||
<!-- voicemessage -->
|
<!-- voicemessage -->
|
||||||
<color name="nc_voice_message_outgoing_controls">#606060</color>
|
<color name="nc_voice_message_outgoing_controls">#606060</color>
|
||||||
|
|
||||||
|
<color name="camera_bg_tint">#99121212</color>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue