diff --git a/app/build.gradle b/app/build.gradle index c2ae63e51a74efe725e2a8943232ae3a0f6d01ff..4828ac08aaa4f2f86a2a4f111027779f6b6b2e4b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,6 +4,11 @@ android { compileSdkVersion 29 compileOptions.encoding = 'UTF-8' + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + defaultConfig { applicationId "foundation.e.camera" minSdkVersion 21 @@ -19,6 +24,10 @@ android { } buildTypes { + debug { + applicationIdSuffix ".debug" + } + release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' @@ -46,6 +55,7 @@ android { dependencies { compileOnly files("../e-ui-sdk.jar") //noinspection GradleCompatible - implementation 'com.android.support:support-v4:28.0.0' + implementation 'androidx.legacy:legacy-support-v4:1.0.0' + implementation "androidx.constraintlayout:constraintlayout:2.1.3" testImplementation 'junit:junit:4.13' } diff --git a/app/src/androidTest/java/net/sourceforge/opencamera/test/MainActivityTest.java b/app/src/androidTest/java/net/sourceforge/opencamera/test/MainActivityTest.java index b99fe6bf0bfb6d0b76d111122ed4dd08ae61e463..fe0b6853338ec7505033cedaed43bb41b1bd386d 100644 --- a/app/src/androidTest/java/net/sourceforge/opencamera/test/MainActivityTest.java +++ b/app/src/androidTest/java/net/sourceforge/opencamera/test/MainActivityTest.java @@ -1,10 +1,8 @@ package net.sourceforge.opencamera.test; import java.io.File; -import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; -import java.io.InputStream; import java.io.OutputStream; import java.io.IOException; import java.text.SimpleDateFormat; @@ -59,7 +57,7 @@ import android.os.Environment; import android.preference.PreferenceManager; import android.provider.MediaStore; import android.renderscript.Allocation; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; import android.test.ActivityInstrumentationTestCase2; import android.test.TouchUtils; import android.util.Log; diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 03a33c13e3035bc44d6a62549b133c9a65a99131..b5366f48887f8231e940cac4867c1212353b6892 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -86,7 +86,7 @@ @@ -123,7 +123,7 @@ @@ -133,7 +133,7 @@ @@ -143,7 +143,7 @@ diff --git a/app/src/main/java/net/sourceforge/opencamera/HDRProcessor.java b/app/src/main/java/net/sourceforge/opencamera/HDRProcessor.java index 93f7b9038f13e38cae3a9cf525c49662bd4b7478..f58882c5d9dfd13fff9a11e0614dd6fee994d584 100644 --- a/app/src/main/java/net/sourceforge/opencamera/HDRProcessor.java +++ b/app/src/main/java/net/sourceforge/opencamera/HDRProcessor.java @@ -1,10 +1,8 @@ package net.sourceforge.opencamera; import java.io.File; -import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; -import java.io.OutputStream; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -24,7 +22,7 @@ import android.renderscript.Script; import android.renderscript.ScriptIntrinsicHistogram; //import android.renderscript.ScriptIntrinsicResize; import android.renderscript.Type; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; import android.util.Log; public class HDRProcessor { diff --git a/app/src/main/java/net/sourceforge/opencamera/ImageSaver.java b/app/src/main/java/net/sourceforge/opencamera/ImageSaver.java index 0e2a2561ca6c17af5e7f12ce8e9782cd4a3e2a1f..50b58313132d65cca0d8d9f20f0a9a6d64e0dcb7 100644 --- a/app/src/main/java/net/sourceforge/opencamera/ImageSaver.java +++ b/app/src/main/java/net/sourceforge/opencamera/ImageSaver.java @@ -46,7 +46,7 @@ import android.net.Uri; import android.os.Build; import android.os.ParcelFileDescriptor; import android.renderscript.Allocation; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; import android.util.Log; import android.util.Xml; diff --git a/app/src/main/java/net/sourceforge/opencamera/LocationSupplier.java b/app/src/main/java/net/sourceforge/opencamera/LocationSupplier.java index 9116546300681067435034549a513251b0e9cfe4..3ecebb605f348b49e6ecc3c02370998b14ab3591 100644 --- a/app/src/main/java/net/sourceforge/opencamera/LocationSupplier.java +++ b/app/src/main/java/net/sourceforge/opencamera/LocationSupplier.java @@ -11,7 +11,7 @@ import android.location.LocationProvider; import android.os.Build; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.v4.content.ContextCompat; +import androidx.core.content.ContextCompat; import android.util.Log; /** Handles listening for GPS location (both coarse and fine). diff --git a/app/src/main/java/net/sourceforge/opencamera/MainActivity.java b/app/src/main/java/net/sourceforge/opencamera/MainActivity.java index 14330f5a256bcd65e993a4093810db274f4f079f..2d612a3f7203daa7a32109385c5a9a274b9c5c6f 100644 --- a/app/src/main/java/net/sourceforge/opencamera/MainActivity.java +++ b/app/src/main/java/net/sourceforge/opencamera/MainActivity.java @@ -18,7 +18,6 @@ import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; -import java.util.Hashtable; import java.util.List; import java.util.Locale; import java.util.Map; @@ -30,14 +29,12 @@ import android.app.NotificationManager; import android.content.BroadcastReceiver; import android.content.IntentFilter; import android.content.pm.PackageInfo; -import android.content.res.ColorStateList; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Color; import android.graphics.Matrix; import android.graphics.Point; import android.graphics.PorterDuff; -import android.graphics.drawable.GradientDrawable; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; @@ -69,12 +66,10 @@ import android.content.pm.PackageManager; import android.content.res.Configuration; import android.renderscript.RenderScript; import android.speech.tts.TextToSpeech; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; import android.util.Log; -import android.util.TypedValue; -import android.view.ContextThemeWrapper; import android.view.Display; import android.view.GestureDetector; import android.view.GestureDetector.SimpleOnGestureListener; @@ -90,7 +85,6 @@ import android.view.WindowInsets; import android.view.WindowManager; import android.widget.EditText; import android.widget.ImageButton; -import android.widget.ImageView; import android.widget.SeekBar; import android.widget.SeekBar.OnSeekBarChangeListener; import android.widget.ZoomControls; @@ -414,6 +408,8 @@ public class MainActivity extends Activity { zoomControls.setVisibility(View.GONE); View zoomSeekbar = findViewById(R.id.zoom_seekbar); zoomSeekbar.setVisibility(View.INVISIBLE); + View zoomSeekbarIcon = findViewById(R.id.zoom_seekbar_icon); + zoomSeekbarIcon.setVisibility(View.INVISIBLE); // initialise state of on-screen icons mainUI.updateOnScreenIcons(); @@ -573,7 +569,7 @@ public class MainActivity extends Activity { launchOnlineHelp(); } }); - alertDialog.show(); + showAlertDialog(alertDialog, "first time load dialog dismissed"); } setFirstTimeFlag(); @@ -631,7 +627,7 @@ public class MainActivity extends Activity { startActivity(browserIntent); } }); - alertDialog.show(); + showAlertDialog(alertDialog, "whats new dialog dismissed"); } } // We set the latest_version whether or not the dialog is shown - if we showed the first time dialog, we don't @@ -1174,11 +1170,11 @@ public class MainActivity extends Activity { } public void zoomIn() { - mainUI.changeSeekbar(R.id.zoom_seekbar, -1); + mainUI.changeSeekbar(R.id.zoom_seekbar, 1); } public void zoomOut() { - mainUI.changeSeekbar(R.id.zoom_seekbar, 1); + mainUI.changeSeekbar(R.id.zoom_seekbar, -1); } public void changeExposure(int change) { @@ -1509,13 +1505,16 @@ public class MainActivity extends Activity { } }); alertDialog.setNegativeButton(android.R.string.cancel, null); + showAlertDialog(alertDialog, "custom stamp text dialog dismissed"); + } + private void showAlertDialog(AlertDialog.Builder alertDialog, final String logMessageOnDismiss) { final AlertDialog alert = alertDialog.create(); alert.setOnDismissListener(new DialogInterface.OnDismissListener() { @Override public void onDismiss(DialogInterface arg0) { - if( MyDebug.LOG ) - Log.d(TAG, "custom stamp text dialog dismissed"); + if (MyDebug.LOG) + Log.d(TAG, logMessageOnDismiss); setWindowFlagsForCamera(); showPreview(true); } @@ -2967,7 +2966,8 @@ public class MainActivity extends Activity { /*if( MyDebug.LOG ) Log.d(TAG, "padding: " + bottom);*/ galleryButton.setImageBitmap(null); - galleryButton.setImageResource(lineageos.platform.R.drawable.ic_album); + galleryButton.setImageResource(R.drawable.ic_album); + galleryButton.setBorderWidth(0); // workaround for setImageResource also resetting padding, Android bug galleryButton.setPadding(left, top, right, bottom); gallery_bitmap = null; @@ -2981,6 +2981,7 @@ public class MainActivity extends Activity { Log.d(TAG, "updateGalleryIcon: " + thumbnail); CircleImageView galleryButton = this.findViewById(R.id.gallery); galleryButton.setImageBitmap(thumbnail); + galleryButton.setBorderWidth(6); gallery_bitmap = thumbnail; } @@ -4040,36 +4041,39 @@ public class MainActivity extends Activity { Log.d(TAG, "set up zoom"); if( MyDebug.LOG ) Log.d(TAG, "has_zoom? " + preview.supportsZoom()); - ZoomControls zoomControls = findViewById(R.id.zoom); + View zoomControlHolder = findViewById(R.id.zoom); SeekBar zoomSeekBar = findViewById(R.id.zoom_seekbar); + View zoomSeekbarIcon = findViewById(R.id.zoom_seekbar_icon); if( preview.supportsZoom() ) { if( sharedPreferences.getBoolean(PreferenceKeys.ShowZoomControlsPreferenceKey, false) ) { - zoomControls.setIsZoomInEnabled(true); - zoomControls.setIsZoomOutEnabled(true); - zoomControls.setZoomSpeed(20); - - zoomControls.setOnZoomInClickListener(new View.OnClickListener(){ - public void onClick(View v){ - zoomIn(); - } - }); - zoomControls.setOnZoomOutClickListener(new View.OnClickListener(){ - public void onClick(View v){ - zoomOut(); - } - }); if( !mainUI.inImmersiveMode() ) { - zoomControls.setVisibility(View.VISIBLE); + View zoomInButton = findViewById(R.id.button_zoom_in); + View zoomOutButton = findViewById(R.id.button_zoom_out); + + zoomInButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + zoomIn(); + } + }); + + zoomOutButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + zoomOut(); + } + }); + zoomControlHolder.setVisibility(View.VISIBLE); } } else { - zoomControls.setVisibility(View.GONE); + zoomControlHolder.setVisibility(View.GONE); } zoomSeekBar.setOnSeekBarChangeListener(null); // clear an existing listener - don't want to call the listener when setting up the progress bar to match the existing state zoomSeekBar.setMax(preview.getMaxZoom()); - zoomSeekBar.setProgress(preview.getMaxZoom()-preview.getCameraController().getZoom()); + zoomSeekBar.setProgress(preview.getCameraController().getZoom()); zoomSeekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { @@ -4077,7 +4081,7 @@ public class MainActivity extends Activity { Log.d(TAG, "zoom onProgressChanged: " + progress); // note we zoom even if !fromUser, as various other UI controls (multitouch, volume key zoom, -/+ zoomcontrol) // indirectly set zoom via this method, from setting the zoom slider - preview.zoomTo(preview.getMaxZoom() - progress); + preview.zoomTo(progress); } @@ -4093,15 +4097,18 @@ public class MainActivity extends Activity { if( sharedPreferences.getBoolean(PreferenceKeys.ShowZoomSliderControlsPreferenceKey, false) ) { if( !mainUI.inImmersiveMode() ) { zoomSeekBar.setVisibility(View.VISIBLE); + zoomSeekbarIcon.setVisibility(View.VISIBLE); } } else { zoomSeekBar.setVisibility(View.INVISIBLE); // should be INVISIBLE not GONE, as the focus_seekbar is aligned to be left to this; in future we might want this similarly for exposure panel + zoomSeekbarIcon.setVisibility(View.INVISIBLE); } } else { - zoomControls.setVisibility(View.GONE); + zoomControlHolder.setVisibility(View.GONE); zoomSeekBar.setVisibility(View.INVISIBLE); // should be INVISIBLE not GONE, as the focus_seekbar is aligned to be left to this; in future we might want this similarly for the exposure panel + zoomSeekbarIcon.setVisibility(View.INVISIBLE); } if( MyDebug.LOG ) Log.d(TAG, "cameraSetup: time after setting up zoom: " + (System.currentTimeMillis() - debug_time)); @@ -4223,18 +4230,6 @@ public class MainActivity extends Activity { public void onStopTrackingTouch(SeekBar seekBar) { } }); - - ZoomControls seek_bar_zoom = findViewById(R.id.exposure_seekbar_zoom); - seek_bar_zoom.setOnZoomInClickListener(new View.OnClickListener(){ - public void onClick(View v){ - changeExposure(1); - } - }); - seek_bar_zoom.setOnZoomOutClickListener(new View.OnClickListener(){ - public void onClick(View v){ - changeExposure(-1); - } - }); } } if( MyDebug.LOG ) diff --git a/app/src/main/java/net/sourceforge/opencamera/MyApplicationInterface.java b/app/src/main/java/net/sourceforge/opencamera/MyApplicationInterface.java index 5e608b5fe5c394596aa08a858fe03f3124f56e0a..8820143c6f6060f3c94e11c7dc479c15dc9782a1 100644 --- a/app/src/main/java/net/sourceforge/opencamera/MyApplicationInterface.java +++ b/app/src/main/java/net/sourceforge/opencamera/MyApplicationInterface.java @@ -1902,7 +1902,7 @@ public class MyApplicationInterface extends BasicApplicationInterface { } ImageButton view = main_activity.findViewById(R.id.take_photo); - view.setImageTintList(ColorStateList.valueOf(main_activity.getResources().getColor(lineageos.platform.R.color.color_default_red1))); + view.setImageResource(R.drawable.ic_camera_video_recording); final int video_method = this.createOutputVideoMethod(); boolean dategeo_subtitles = getVideoSubtitlePref().equals("preference_video_subtitle_yes"); if( dategeo_subtitles && video_method != ApplicationInterface.VIDEOMETHOD_URI ) { diff --git a/app/src/main/java/net/sourceforge/opencamera/MyPreferenceFragment.java b/app/src/main/java/net/sourceforge/opencamera/MyPreferenceFragment.java index 379262801e123a2b4a728e6a5f93913f4025c44d..4785f3f1c7ed29172e068b8de00ad92826a203ee 100644 --- a/app/src/main/java/net/sourceforge/opencamera/MyPreferenceFragment.java +++ b/app/src/main/java/net/sourceforge/opencamera/MyPreferenceFragment.java @@ -34,6 +34,7 @@ import android.preference.PreferenceFragment; import android.preference.PreferenceGroup; import android.preference.PreferenceManager; import android.preference.TwoStatePreference; +import androidx.annotation.Nullable; import android.text.SpannableString; import android.text.Spanned; import android.text.method.LinkMovementMethod; @@ -41,6 +42,9 @@ import android.text.style.URLSpan; import android.util.DisplayMetrics; import android.util.Log; import android.view.Display; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; import android.widget.EditText; import android.widget.ScrollView; import android.widget.TextView; @@ -1518,6 +1522,12 @@ public class MyPreferenceFragment extends PreferenceFragment implements OnShared setupDependencies(); } + + @Override + public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { + return inflater.inflate(R.layout.custom_preference_list, container, false); + } + /** Programmatically set up dependencies for preference types (e.g., ListPreference) that don't * support this in xml (such as SwitchPreference and CheckBoxPreference). */ diff --git a/app/src/main/java/net/sourceforge/opencamera/MyTileService.java b/app/src/main/java/net/sourceforge/opencamera/MyTileService.java index fa83d80be2bc59cdcc4bde4bd866688976b16e12..e781b5c136750802f51ac3818ea4605734a52a09 100644 --- a/app/src/main/java/net/sourceforge/opencamera/MyTileService.java +++ b/app/src/main/java/net/sourceforge/opencamera/MyTileService.java @@ -3,7 +3,7 @@ package net.sourceforge.opencamera; import android.content.Intent; import android.os.Build; import android.service.quicksettings.TileService; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; import android.util.Log; /** Provides service for quick settings tile. diff --git a/app/src/main/java/net/sourceforge/opencamera/MyTileServiceFrontCamera.java b/app/src/main/java/net/sourceforge/opencamera/MyTileServiceFrontCamera.java index 5b8db19b72890dc9bef24d3aa0a5f6ff9080b017..101ae4f2ed6c40ff5d460fde4d31c1316d899964 100644 --- a/app/src/main/java/net/sourceforge/opencamera/MyTileServiceFrontCamera.java +++ b/app/src/main/java/net/sourceforge/opencamera/MyTileServiceFrontCamera.java @@ -3,7 +3,7 @@ package net.sourceforge.opencamera; import android.content.Intent; import android.os.Build; import android.service.quicksettings.TileService; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; import android.util.Log; /** Provides service for quick settings tile. diff --git a/app/src/main/java/net/sourceforge/opencamera/MyTileServiceVideo.java b/app/src/main/java/net/sourceforge/opencamera/MyTileServiceVideo.java index 8d9fb0a568b64c3d2a844b86bc2396d49c793640..50c3f265cbf78bb964a22551ae484928d7b5182e 100644 --- a/app/src/main/java/net/sourceforge/opencamera/MyTileServiceVideo.java +++ b/app/src/main/java/net/sourceforge/opencamera/MyTileServiceVideo.java @@ -3,7 +3,7 @@ package net.sourceforge.opencamera; import android.content.Intent; import android.os.Build; import android.service.quicksettings.TileService; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; import android.util.Log; /** Provides service for quick settings tile. diff --git a/app/src/main/java/net/sourceforge/opencamera/PanoramaProcessor.java b/app/src/main/java/net/sourceforge/opencamera/PanoramaProcessor.java index b5bb016213fdf07a78f7bcf0ef30f90212f77c78..378d977d60579d4aee4cf71a75132982136bbfe9 100644 --- a/app/src/main/java/net/sourceforge/opencamera/PanoramaProcessor.java +++ b/app/src/main/java/net/sourceforge/opencamera/PanoramaProcessor.java @@ -27,7 +27,7 @@ import android.renderscript.RenderScript; import android.renderscript.Script; //import android.renderscript.ScriptIntrinsicResize; import android.renderscript.Type; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; import android.util.Log; public class PanoramaProcessor { diff --git a/app/src/main/java/net/sourceforge/opencamera/PermissionHandler.java b/app/src/main/java/net/sourceforge/opencamera/PermissionHandler.java index 71529732e807b4febc65731b9392067d31386427..ef82c09881d5babbae5277beba29c113f21789a8 100644 --- a/app/src/main/java/net/sourceforge/opencamera/PermissionHandler.java +++ b/app/src/main/java/net/sourceforge/opencamera/PermissionHandler.java @@ -8,8 +8,8 @@ import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.os.Build; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.v4.app.ActivityCompat; +import androidx.annotation.NonNull; +import androidx.core.app.ActivityCompat; import android.util.Log; import foundation.e.camera.R; diff --git a/app/src/main/java/net/sourceforge/opencamera/ScaleUtils.java b/app/src/main/java/net/sourceforge/opencamera/ScaleUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..0b50e16b869b51b56657f363869c37057524f876 --- /dev/null +++ b/app/src/main/java/net/sourceforge/opencamera/ScaleUtils.java @@ -0,0 +1,17 @@ +package net.sourceforge.opencamera; + +import android.content.Context; + +public class ScaleUtils { + + private ScaleUtils() { + } + + public static float convertPxToDp(Context context, float px) { + return px / context.getResources().getDisplayMetrics().density; + } + + public static float convertDpToPx(Context context, float dp) { + return dp * context.getResources().getDisplayMetrics().density; + } +} diff --git a/app/src/main/java/net/sourceforge/opencamera/StorageUtils.java b/app/src/main/java/net/sourceforge/opencamera/StorageUtils.java index 70529cac2387f51e6cffb96ae9195de6466a94c3..0a22d84accf522d44316a53df1c44340be50935c 100644 --- a/app/src/main/java/net/sourceforge/opencamera/StorageUtils.java +++ b/app/src/main/java/net/sourceforge/opencamera/StorageUtils.java @@ -34,8 +34,8 @@ import android.provider.MediaStore.Video; import android.provider.MediaStore.Images.ImageColumns; import android.provider.MediaStore.Video.VideoColumns; import android.provider.OpenableColumns; -import android.support.annotation.RequiresApi; -import android.support.v4.content.ContextCompat; +import androidx.annotation.RequiresApi; +import androidx.core.content.ContextCompat; import android.system.Os; import android.system.StructStatVfs; import android.util.Log; diff --git a/app/src/main/java/net/sourceforge/opencamera/cameracontroller/CameraController2.java b/app/src/main/java/net/sourceforge/opencamera/cameracontroller/CameraController2.java index d7a943605409c8dd3b4da403b11b8153abd80d6c..077ed27fa50385826323826518b714c8930ff42d 100644 --- a/app/src/main/java/net/sourceforge/opencamera/cameracontroller/CameraController2.java +++ b/app/src/main/java/net/sourceforge/opencamera/cameracontroller/CameraController2.java @@ -43,8 +43,8 @@ import android.media.MediaRecorder; import android.os.Build; import android.os.Handler; import android.os.HandlerThread; -import android.support.annotation.NonNull; -import android.support.annotation.RequiresApi; +import androidx.annotation.NonNull; +import androidx.annotation.RequiresApi; import android.util.Log; import android.util.Pair; import android.util.Range; diff --git a/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java b/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java index c1b34679136d2c04369fb00d3cb9d28f63463aa3..9ce9996637a9b5cb4358c636ecc4db548b1ced5a 100644 --- a/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java +++ b/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java @@ -76,8 +76,8 @@ import android.renderscript.Element; import android.renderscript.RSInvalidStateException; import android.renderscript.RenderScript; import android.renderscript.Type; -import android.support.annotation.RequiresApi; -import android.support.v4.content.ContextCompat; +import androidx.annotation.RequiresApi; +import androidx.core.content.ContextCompat; import android.util.Log; import android.util.Pair; import android.view.Display; @@ -7244,9 +7244,7 @@ public class Preview implements SurfaceHolder.Callback, TextureView.SurfaceTextu paint.setStyle(Paint.Style.FILL); if (!style_outline) { - paint.setColor(Color.rgb(50, 50, 50)); - //paint.setColor(Color.argb(32, 0, 0, 0)); - //canvas.drawRect(rect, paint); + paint.setColor(Preview.this.getResources().getColor(R.color.color_toast_bg)); final float radius = (24 * scale + 0.5f); // convert dps to pixels canvas.drawRoundRect(rect, radius, radius, paint); } diff --git a/app/src/main/java/net/sourceforge/opencamera/remotecontrol/BluetoothLeService.java b/app/src/main/java/net/sourceforge/opencamera/remotecontrol/BluetoothLeService.java index b9a6f4b07bb422f4bf92abce6755c85a14ce1c41..6cacf161bcbc778a8b2b62075b3c25a3da6ce76c 100644 --- a/app/src/main/java/net/sourceforge/opencamera/remotecontrol/BluetoothLeService.java +++ b/app/src/main/java/net/sourceforge/opencamera/remotecontrol/BluetoothLeService.java @@ -18,7 +18,7 @@ import android.os.Binder; import android.os.Build; import android.os.Handler; import android.os.IBinder; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; import android.util.Log; import java.util.ArrayList; diff --git a/app/src/main/java/net/sourceforge/opencamera/remotecontrol/BluetoothRemoteControl.java b/app/src/main/java/net/sourceforge/opencamera/remotecontrol/BluetoothRemoteControl.java index 14cae2e1e886f2305839e5a982e2deceddc562ca..eb25c2fabcaf11c8059cef75027978c8dd2daf35 100644 --- a/app/src/main/java/net/sourceforge/opencamera/remotecontrol/BluetoothRemoteControl.java +++ b/app/src/main/java/net/sourceforge/opencamera/remotecontrol/BluetoothRemoteControl.java @@ -11,7 +11,7 @@ import android.os.Build; import android.os.Handler; import android.os.IBinder; import android.preference.PreferenceManager; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; import android.util.Log; import net.sourceforge.opencamera.MainActivity; diff --git a/app/src/main/java/net/sourceforge/opencamera/remotecontrol/DeviceScanner.java b/app/src/main/java/net/sourceforge/opencamera/remotecontrol/DeviceScanner.java index a1130e9dc9d7c774d1e6295e50d471576936b9ac..ecb2a268458da94bb4bcd781ae2a68bb60f100e5 100644 --- a/app/src/main/java/net/sourceforge/opencamera/remotecontrol/DeviceScanner.java +++ b/app/src/main/java/net/sourceforge/opencamera/remotecontrol/DeviceScanner.java @@ -16,10 +16,10 @@ import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.annotation.RequiresApi; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; +import androidx.annotation.NonNull; +import androidx.annotation.RequiresApi; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; import android.util.Log; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/net/sourceforge/opencamera/ui/CircleImageView.java b/app/src/main/java/net/sourceforge/opencamera/ui/CircleImageView.java index 651fcc3c1660bc1a8d1c3ff3045417ca1ea7410e..085253275ed297dae263f8fa3c85859b98e07add 100644 --- a/app/src/main/java/net/sourceforge/opencamera/ui/CircleImageView.java +++ b/app/src/main/java/net/sourceforge/opencamera/ui/CircleImageView.java @@ -19,11 +19,11 @@ import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Build; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.RequiresApi; +import androidx.annotation.ColorInt; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.RequiresApi; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; diff --git a/app/src/main/java/net/sourceforge/opencamera/ui/DrawPreview.java b/app/src/main/java/net/sourceforge/opencamera/ui/DrawPreview.java index 77e41e3569ec675907c5c8e1a4e526a5244b7fdd..4ac1b115ca15e94aebfb5d20e9ea0251243a5b5b 100644 --- a/app/src/main/java/net/sourceforge/opencamera/ui/DrawPreview.java +++ b/app/src/main/java/net/sourceforge/opencamera/ui/DrawPreview.java @@ -27,7 +27,6 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; -import android.content.pm.PackageManager; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; @@ -55,6 +54,8 @@ import android.view.Surface; import android.view.View; import android.widget.RelativeLayout; +import androidx.annotation.NonNull; + public class DrawPreview { private static final String TAG = "DrawPreview"; @@ -164,7 +165,7 @@ public class DrawPreview { private Bitmap location_off_bitmap; private Bitmap raw_jpeg_bitmap; private Bitmap raw_only_bitmap; - private Bitmap auto_stabilise_bitmap; + private Drawable auto_stabilise_drawable; private Bitmap dro_bitmap; private Bitmap hdr_bitmap; private Bitmap panorama_bitmap; @@ -173,8 +174,8 @@ public class DrawPreview { private Bitmap burst_bitmap; private Bitmap nr_bitmap; private Bitmap photostamp_bitmap; - private Drawable flash_bitmap; - private Bitmap face_detection_bitmap; + private Drawable flash_drawable; + private Drawable face_detection_drawable; private Bitmap audio_disabled_bitmap; private Bitmap high_speed_fps_bitmap; private Bitmap slow_motion_bitmap; @@ -256,7 +257,7 @@ public class DrawPreview { location_off_bitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.ic_gps_off_white_48dp); raw_jpeg_bitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.raw_icon); raw_only_bitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.raw_only_icon); - auto_stabilise_bitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.auto_stabilise_icon); + auto_stabilise_drawable = getContext().getResources().getDrawable(R.drawable.ic_preference_auto_stabilise); dro_bitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.dro_icon); hdr_bitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.ic_hdr_on_white_48dp); panorama_bitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.baseline_panorama_horizontal_white_48); @@ -265,12 +266,8 @@ public class DrawPreview { burst_bitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.ic_burst_mode_white_48dp); nr_bitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.nr_icon); photostamp_bitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.ic_text_format_white_48dp); - try { - flash_bitmap = getContext().getPackageManager().getResourcesForApplication("lineageos.platform").getDrawable(lineageos.platform.R.drawable.ic_camera_flash_on); - } catch (PackageManager.NameNotFoundException e) { - e.printStackTrace(); - } - face_detection_bitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.ic_face_white_48dp); + flash_drawable = getContext().getResources().getDrawable(R.drawable.ic_camera_flash_on); + face_detection_drawable = getContext().getResources().getDrawable(R.drawable.ic_face); audio_disabled_bitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.ic_mic_off_white_48dp); high_speed_fps_bitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.ic_fast_forward_white_48dp); slow_motion_bitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.ic_slow_motion_video_white_48dp); @@ -301,9 +298,8 @@ public class DrawPreview { raw_only_bitmap.recycle(); raw_only_bitmap = null; } - if( auto_stabilise_bitmap != null ) { - auto_stabilise_bitmap.recycle(); - auto_stabilise_bitmap = null; + if( auto_stabilise_drawable != null ) { + auto_stabilise_drawable = null; } if( dro_bitmap != null ) { dro_bitmap.recycle(); @@ -337,9 +333,8 @@ public class DrawPreview { photostamp_bitmap.recycle(); photostamp_bitmap = null; } - if( face_detection_bitmap != null ) { - face_detection_bitmap.recycle(); - face_detection_bitmap = null; + if( face_detection_drawable != null ) { + face_detection_drawable = null; } if( audio_disabled_bitmap != null ) { audio_disabled_bitmap.recycle(); @@ -1082,7 +1077,7 @@ public class DrawPreview { int ui_rotation = preview.getUIRotation(); // set up text etc for the multiple lines of "info" (time, free mem, etc) - p.setTextSize(16 * scale + 0.5f); // convert dps to pixels + p.setTextSize(12.6f * scale + 0.5f); // convert dps to pixels p.setTextAlign(Paint.Align.LEFT); int location_x = top_x; int location_y = top_y; @@ -1221,7 +1216,7 @@ public class DrawPreview { Color.WHITE, Color.BLACK, location_x, bottom_y, MyApplicationInterface.Alignment.ALIGNMENT_BOTTOM, null, MyApplicationInterface.Shadow.SHADOW_OUTLINE); } - p.setTextSize(16 * scale + 0.5f); // Restore text size + p.setTextSize(12.6f * scale + 0.5f); // Restore text size if( camera_controller != null && show_iso_pref ) { if( iso_exposure_string == null || time_ms > last_iso_exposure_time + 500 ) { @@ -1364,7 +1359,7 @@ public class DrawPreview { p.setAlpha(64); canvas.drawRect(icon_dest, p); p.setAlpha(255); - canvas.drawBitmap(face_detection_bitmap, null, icon_dest, p); + face_detection_drawable.draw(canvas); if( ui_rotation == 180 ) { location_x2 -= icon_size + flash_padding; @@ -1381,7 +1376,7 @@ public class DrawPreview { p.setAlpha(64); canvas.drawRect(icon_dest, p); p.setAlpha(255); - canvas.drawBitmap(auto_stabilise_bitmap, null, icon_dest, p); + auto_stabilise_drawable.draw(canvas); if( ui_rotation == 180 ) { location_x2 -= icon_size + flash_padding; @@ -1530,8 +1525,7 @@ public class DrawPreview { p.setAlpha((int)(64*alpha)); canvas.drawRect(icon_dest, p); p.setAlpha((int)(255*alpha)); - flash_bitmap.draw(canvas); - //canvas.drawBitmap(flash_bitmap, null, icon_dest, p); + flash_drawable.draw(canvas); p.setAlpha(255); } else { @@ -2003,7 +1997,7 @@ public class DrawPreview { // Convert the dps to pixels, based on density scale p.setTextSize(14 * scale + 0.5f); // convert dps to pixels p.setTextAlign(Paint.Align.CENTER); - applicationInterface.drawTextWithBackground(canvas, p, getContext().getResources().getString(R.string.zoom) + ": " + zoom_ratio +"x", Color.WHITE, Color.BLACK, canvas.getWidth() / 2, text_base_y - text_y, MyApplicationInterface.Alignment.ALIGNMENT_BOTTOM, ybounds_text, MyApplicationInterface.Shadow.SHADOW_OUTLINE); + applicationInterface.drawTextWithBackground(canvas, p, getZoomText(zoom_ratio), Color.WHITE, Color.BLACK, canvas.getWidth() / 2, text_base_y - text_y - 100, MyApplicationInterface.Alignment.ALIGNMENT_BOTTOM, ybounds_text, MyApplicationInterface.Shadow.SHADOW_OUTLINE); } } @@ -2035,7 +2029,7 @@ public class DrawPreview { } int top_x = (int) (5 * scale + 0.5f); // convert dps to pixels - int top_y = (int) (5 * scale + 0.5f); // convert dps to pixels + int top_y = (int) (15 * scale + 0.5f); // convert dps to pixels View top_icon = main_activity.getMainUI().getTopIcon(); if( top_icon != null ) { if( last_top_icon_shift_time == 0 || time_ms > last_top_icon_shift_time + 1000 ) { @@ -2152,6 +2146,11 @@ public class DrawPreview { canvas.restore(); } + @NonNull + private String getZoomText(float zoom_ratio) { + return "· " + zoom_ratio + "X" + " ·"; + } + private void drawAngleLines(Canvas canvas, long time_ms) { Preview preview = main_activity.getPreview(); CameraController camera_controller = preview.getCameraController(); diff --git a/app/src/main/java/net/sourceforge/opencamera/ui/FolderChooserDialog.java b/app/src/main/java/net/sourceforge/opencamera/ui/FolderChooserDialog.java index faf50a91f3367318c583c81ae077412a4b61a128..6d97475f6f02e22dd7a272e22d32718896082435 100644 --- a/app/src/main/java/net/sourceforge/opencamera/ui/FolderChooserDialog.java +++ b/app/src/main/java/net/sourceforge/opencamera/ui/FolderChooserDialog.java @@ -16,7 +16,7 @@ import android.app.DialogFragment; import android.content.DialogInterface; import android.os.Bundle; import android.os.Environment; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.text.InputFilter; import android.text.Spanned; import android.util.Log; diff --git a/app/src/main/java/net/sourceforge/opencamera/ui/MainUI.java b/app/src/main/java/net/sourceforge/opencamera/ui/MainUI.java index 818b2f3e2451c8644387f5c4975a4df7a03c39b1..1ab04702f270e9eacece03180110178b96520c53 100644 --- a/app/src/main/java/net/sourceforge/opencamera/ui/MainUI.java +++ b/app/src/main/java/net/sourceforge/opencamera/ui/MainUI.java @@ -1,6 +1,7 @@ package net.sourceforge.opencamera.ui; import net.sourceforge.opencamera.MyApplicationInterface; +import net.sourceforge.opencamera.ScaleUtils; import net.sourceforge.opencamera.cameracontroller.CameraController; import net.sourceforge.opencamera.MainActivity; import net.sourceforge.opencamera.MyDebug; @@ -40,7 +41,6 @@ import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.SeekBar; -import android.widget.ZoomControls; import java.util.ArrayList; import java.util.Hashtable; @@ -303,17 +303,6 @@ public class MainUI { if (ui_placement == UIPlacement.UIPLACEMENT_TOP) { // not part of the icon panel in TOP mode view = main_activity.findViewById(R.id.gallery); - layoutParams = (RelativeLayout.LayoutParams) view.getLayoutParams(); - layoutParams.addRule(align_parent_left, 0); - layoutParams.addRule(align_parent_right, RelativeLayout.TRUE); - layoutParams.addRule(align_parent_top, RelativeLayout.TRUE); - layoutParams.addRule(align_parent_bottom, 0); - layoutParams.addRule(above, 0); - layoutParams.addRule(below, 0); - layoutParams.addRule(left_of, 0); - layoutParams.addRule(right_of, 0); - layoutParams.setMargins(0, 0, navigation_gap, 0); - view.setLayoutParams(layoutParams); setViewRotation(view, ui_rotation); } else { buttons_permanent.add(main_activity.findViewById(R.id.gallery)); @@ -389,6 +378,7 @@ public class MainUI { }*/ int total_button_size = count * button_size; int margin = 0; + int topMargin = (int)ScaleUtils.convertDpToPx(main_activity, 24.0f); if (total_button_size > display_height) { if (MyDebug.LOG) Log.d(TAG, "need to reduce button size"); @@ -397,13 +387,14 @@ public class MainUI { if (MyDebug.LOG) Log.d(TAG, "need to increase margin"); if (count > 1) - margin = (display_height - total_button_size) / (count - 1); + margin = (display_height - total_button_size - (2 * topMargin)) / (count - 1); } if (MyDebug.LOG) { Log.d(TAG, "button_size: " + button_size); Log.d(TAG, "total_button_size: " + total_button_size); Log.d(TAG, "margin: " + margin); } + int leftMargin = (int)ScaleUtils.convertDpToPx(main_activity, 16.0f); for (View this_view : buttons_permanent) { if (this_view.getVisibility() == View.VISIBLE) { if (MyDebug.LOG) { @@ -418,13 +409,18 @@ public class MainUI { // is displayed (when taking a photo) if it is still shown left-most, rather than centred; also // needed for "pause preview" trash/icons to be shown properly (test by rotating the phone to update // the layout) - layoutParams.setMargins(0, this_view == first_visible_view ? 0 : margin / 2, 0, this_view == last_visible_view ? 0 : margin / 2); + layoutParams.setMargins(leftMargin, this_view == first_visible_view ? topMargin : margin / 2, 0, this_view == last_visible_view ? topMargin : margin / 2); layoutParams.width = button_size; layoutParams.height = button_size; this_view.setLayoutParams(layoutParams); } } - top_icon = first_visible_view; + + view = main_activity.findViewById(R.id.top_bg); + layoutParams = (RelativeLayout.LayoutParams) view.getLayoutParams(); + layoutParams.width = button_size + (2 * leftMargin); + view.setLayoutParams(layoutParams); + top_icon = view; } } else { // need to reset size/margins to their default @@ -439,101 +435,42 @@ public class MainUI { // end icon panel + int rightSideMargin = (int) ScaleUtils.convertDpToPx(main_activity, 23.0f); + rightSideMargin += navigation_gap; + + view = main_activity.findViewById(R.id.bottom_buttons_holder); + int bottomBarLeftPadding = (int) ScaleUtils.convertDpToPx(main_activity, 23.0f); + int bottomBarTopBottomPadding = (int) ScaleUtils.convertDpToPx(main_activity, 20.0f); + view.setPadding(bottomBarLeftPadding, bottomBarTopBottomPadding, rightSideMargin, bottomBarTopBottomPadding); + view = main_activity.findViewById(R.id.take_photo); - layoutParams = (RelativeLayout.LayoutParams) view.getLayoutParams(); - layoutParams.addRule(align_parent_left, 0); - layoutParams.addRule(align_parent_right, RelativeLayout.TRUE); - layoutParams.setMargins(0, 0, navigation_gap, 0); - view.setLayoutParams(layoutParams); setViewRotation(view, ui_rotation); view = main_activity.findViewById(R.id.switch_camera); - layoutParams = (RelativeLayout.LayoutParams) view.getLayoutParams(); - layoutParams.addRule(align_parent_left, 0); - layoutParams.addRule(align_parent_right, RelativeLayout.TRUE); - layoutParams.setMargins(0, 0, navigation_gap, 0); - view.setLayoutParams(layoutParams); setViewRotation(view, ui_rotation); view = main_activity.findViewById(R.id.switch_multi_camera); - layoutParams = (RelativeLayout.LayoutParams) view.getLayoutParams(); - view.setLayoutParams(layoutParams); setViewRotation(view, ui_rotation); view = main_activity.findViewById(R.id.pause_video); - layoutParams = (RelativeLayout.LayoutParams) view.getLayoutParams(); - layoutParams.addRule(align_parent_left, 0); - layoutParams.addRule(align_parent_right, RelativeLayout.TRUE); - layoutParams.setMargins(0, 0, navigation_gap, 0); - view.setLayoutParams(layoutParams); setViewRotation(view, ui_rotation); view = main_activity.findViewById(R.id.cancel_panorama); - layoutParams = (RelativeLayout.LayoutParams) view.getLayoutParams(); - layoutParams.addRule(align_parent_left, 0); - layoutParams.addRule(align_parent_right, RelativeLayout.TRUE); - layoutParams.setMargins(0, 0, navigation_gap, 0); - view.setLayoutParams(layoutParams); setViewRotation(view, ui_rotation); view = main_activity.findViewById(R.id.switch_video); - layoutParams = (RelativeLayout.LayoutParams) view.getLayoutParams(); - layoutParams.addRule(align_parent_left, 0); - layoutParams.addRule(align_parent_right, RelativeLayout.TRUE); - layoutParams.setMargins(0, 0, navigation_gap, 0); - view.setLayoutParams(layoutParams); setViewRotation(view, ui_rotation); view = main_activity.findViewById(R.id.take_photo_when_video_recording); - layoutParams = (RelativeLayout.LayoutParams) view.getLayoutParams(); - layoutParams.addRule(align_parent_left, 0); - layoutParams.addRule(align_parent_right, RelativeLayout.TRUE); - layoutParams.setMargins(0, 0, navigation_gap, 0); - view.setLayoutParams(layoutParams); setViewRotation(view, ui_rotation); view = main_activity.findViewById(R.id.zoom); - layoutParams = (RelativeLayout.LayoutParams) view.getLayoutParams(); - layoutParams.addRule(align_parent_left, 0); - layoutParams.addRule(align_parent_right, RelativeLayout.TRUE); - layoutParams.addRule(align_parent_top, 0); - layoutParams.addRule(align_parent_bottom, RelativeLayout.TRUE); - layoutParams.setMargins(0, 0, navigation_gap, 0); - view.setLayoutParams(layoutParams); - view.setRotation(180.0f); // should always match the zoom_seekbar, so that zoom in and out are in the same directions - - // view = main_activity.findViewById(R.id.zoom_seekbar); - layoutParams = (RelativeLayout.LayoutParams) view.getLayoutParams(); - // if we are showing the zoom control, the align next to that; otherwise have it aligned close to the edge of screen - if (sharedPreferences.getBoolean(PreferenceKeys.ShowZoomControlsPreferenceKey, false)) { - layoutParams.addRule(align_left, 0); - layoutParams.addRule(align_right, R.id.zoom); - layoutParams.addRule(above, R.id.zoom); - layoutParams.addRule(below, 0); - // need to clear the others, in case we turn zoom controls on/off - layoutParams.addRule(align_parent_left, 0); - layoutParams.addRule(align_parent_right, 0); - layoutParams.addRule(align_parent_top, 0); - layoutParams.addRule(align_parent_bottom, 0); - layoutParams.setMargins(0, 0, 0, 0); - } else { - layoutParams.addRule(align_parent_left, 0); - layoutParams.addRule(align_parent_right, RelativeLayout.TRUE); - layoutParams.addRule(align_parent_top, 0); - layoutParams.addRule(align_parent_bottom, RelativeLayout.TRUE); - layoutParams.setMargins(0, 0, navigation_gap, 0); - // need to clear the others, in case we turn zoom controls on/off - layoutParams.addRule(align_left, 0); - layoutParams.addRule(align_right, 0); - layoutParams.addRule(above, 0); - layoutParams.addRule(below, 0); - } - view.setLayoutParams(layoutParams); + setViewRotation(view, ui_rotation); view = main_activity.findViewById(R.id.zoom_seekbar); LinearLayout.LayoutParams linearLayoutParams = (LinearLayout.LayoutParams) view.getLayoutParams(); - int marginBottom = (navigation_gap + main_activity.getResources().getDimensionPixelSize(R.dimen.shutter_button_size)) - (main_activity.getResources().getDimensionPixelSize(R.dimen.zoom_seekbar_hw_diff)); - linearLayoutParams.setMargins(0, 0, marginBottom, 0); + int zoomSeekBarMarginRight = (rightSideMargin + 140); + linearLayoutParams.setMargins(0, 0, zoomSeekBarMarginRight, 0); view.setLayoutParams(linearLayoutParams); view = main_activity.findViewById(R.id.focus_seekbar); @@ -652,9 +589,6 @@ public class MainUI { lp.height = height_pixels; view.setLayoutParams(lp); - view = main_activity.findViewById(R.id.exposure_seekbar_zoom); - view.setAlpha(0.5f); - view = main_activity.findViewById(R.id.iso_seekbar); lp = (RelativeLayout.LayoutParams) view.getLayoutParams(); lp.width = width_pixels; @@ -812,22 +746,20 @@ public class MainUI { ImageButton view = main_activity.findViewById(R.id.take_photo); int resource; int content_description; - ColorStateList tintList = ColorStateList.valueOf(main_activity.getResources().getColor(R.color.color_default_accent)); int switch_video_content_description; if (main_activity.getPreview().isVideo()) { if (MyDebug.LOG) Log.d(TAG, "set icon to video " + main_activity.getPreview().isVideoRecording()); - resource = lineageos.platform.R.drawable.ic_camera_shutter; - tintList = main_activity.getPreview().isVideoRecording() - ? ColorStateList.valueOf(main_activity.getResources().getColor(lineageos.platform.R.color.color_default_red1)) - : ColorStateList.valueOf(main_activity.getResources().getColor(R.color.color_default_accent)); + resource = main_activity.getPreview().isVideoRecording() + ? R.drawable.ic_camera_video_recording + : R.drawable.ic_camera_video; content_description = main_activity.getPreview().isVideoRecording() ? R.string.stop_video : R.string.start_video; switch_video_content_description = R.string.switch_to_photo; } else if (main_activity.getApplicationInterface().getPhotoMode() == MyApplicationInterface.PhotoMode.Panorama && main_activity.getApplicationInterface().getGyroSensor().isRecording()) { if (MyDebug.LOG) Log.d(TAG, "set icon to recording panorama"); - resource = R.drawable.baseline_check_white_48; + resource = R.drawable.ic_done; content_description = R.string.finish_panorama; switch_video_content_description = R.string.switch_to_video; } else { @@ -838,13 +770,12 @@ public class MainUI { switch_video_content_description = R.string.switch_to_video; } view.setImageResource(resource); - view.setImageTintList(tintList); view.setContentDescription(main_activity.getResources().getString(content_description)); view.setTag(resource); // for testing view = main_activity.findViewById(R.id.switch_video); view.setContentDescription(main_activity.getResources().getString(switch_video_content_description)); - resource = main_activity.getPreview().isVideo() ? lineageos.platform.R.drawable.ic_camera_photo : lineageos.platform.R.drawable.ic_camera_video; + resource = main_activity.getPreview().isVideo() ? R.drawable.ic_switch_camera : R.drawable.ic_switch_video; view.setImageResource(resource); view.setTag(resource); // for testing } @@ -890,10 +821,10 @@ public class MainUI { int content_description; if (main_activity.getPreview().isVideoRecordingPaused()) { content_description = R.string.resume_video; - pauseVideoButton.setImageResource(R.drawable.ic_play_circle_outline_white_48dp); + pauseVideoButton.setImageResource(R.drawable.ic_play); } else { content_description = R.string.pause_video; - pauseVideoButton.setImageResource(R.drawable.ic_pause_circle_outline_white_48dp); + pauseVideoButton.setImageResource(R.drawable.ic_pause); } if (MyDebug.LOG) Log.d(TAG, "content_description: " + main_activity.getResources().getString(content_description)); @@ -1061,6 +992,7 @@ public class MainUI { View settingsButton = main_activity.findViewById(R.id.settings); View zoomControls = main_activity.findViewById(R.id.zoom); View zoomSeekBar = main_activity.findViewById(R.id.zoom_seekbar); + View zoomSeekbarIcon = main_activity.findViewById(R.id.zoom_seekbar_icon); if (main_activity.getPreview().getCameraControllerManager().getNumberOfCameras() > 1) switchCameraButton.setVisibility(visibility); if (main_activity.showSwitchMultiCamIcon()) @@ -1099,6 +1031,7 @@ public class MainUI { } if (main_activity.getPreview().supportsZoom() && sharedPreferences.getBoolean(PreferenceKeys.ShowZoomSliderControlsPreferenceKey, false)) { zoomSeekBar.setVisibility(visibility); + zoomSeekbarIcon.setVisibility(visibility); } String pref_immersive_mode = sharedPreferences.getString(PreferenceKeys.ImmersiveModePreferenceKey, "immersive_mode_low_profile"); if (pref_immersive_mode.equals("immersive_mode_everything")) { @@ -1228,14 +1161,15 @@ public class MainUI { public void updateExposureLockIcon() { ImageButton view = main_activity.findViewById(R.id.exposure_lock); boolean enabled = main_activity.getPreview().isExposureLocked(); - view.setImageResource(enabled ? lineageos.platform.R.drawable.ic_camera_exposure_locked : lineageos.platform.R.drawable.ic_camera_exposure_unlocked); + view.setImageResource(enabled ? R.drawable.ic_camera_exposure_locked : R.drawable.ic_camera_exposure_unlocked); view.setContentDescription(main_activity.getResources().getString(enabled ? R.string.exposure_unlock : R.string.exposure_lock)); } public void updateWhiteBalanceLockIcon() { ImageButton view = main_activity.findViewById(R.id.white_balance_lock); boolean enabled = main_activity.getPreview().isWhiteBalanceLocked(); - view.setImageResource(enabled ? R.drawable.white_balance_locked : R.drawable.white_balance_unlocked); + view.setImageResource(R.drawable.ic_white_balance_unlocked); + view.setImageTintList(ColorStateList.valueOf(main_activity.getResources().getColor(enabled ? R.color.color_default_accent : R.color.white))); view.setContentDescription(main_activity.getResources().getString(enabled ? R.string.white_balance_unlock : R.string.white_balance_lock)); } @@ -1247,7 +1181,7 @@ public class MainUI { // actually RAW only view.setImageResource(R.drawable.raw_only_icon); } else { - view.setImageResource(R.drawable.raw_icon); + view.setImageResource(R.drawable.ic_raw); } } else { view.setImageResource(R.drawable.raw_off_icon); @@ -1257,27 +1191,31 @@ public class MainUI { public void updateStoreLocationIcon() { ImageButton view = main_activity.findViewById(R.id.store_location); boolean enabled = main_activity.getApplicationInterface().getGeotaggingPref(); - view.setImageResource(enabled ? R.drawable.ic_gps_fixed_red_48dp : R.drawable.ic_gps_fixed_white_48dp); + view.setImageResource(R.drawable.ic_gps_fixed_white_48dp); + view.setImageTintList(ColorStateList.valueOf(main_activity.getResources().getColor(enabled ? R.color.color_default_accent : R.color.white))); view.setContentDescription(main_activity.getResources().getString(enabled ? R.string.preference_location_disable : R.string.preference_location_enable)); } public void updateTextStampIcon() { ImageButton view = main_activity.findViewById(R.id.text_stamp); boolean enabled = !main_activity.getApplicationInterface().getTextStampPref().isEmpty(); - view.setImageResource(enabled ? R.drawable.baseline_text_fields_red_48 : R.drawable.baseline_text_fields_white_48); + view.setImageResource(R.drawable.ic_text_stamp); + view.setImageTintList(ColorStateList.valueOf(main_activity.getResources().getColor(enabled ? R.color.color_default_accent : R.color.white))); } public void updateStampIcon() { ImageButton view = main_activity.findViewById(R.id.stamp); boolean enabled = main_activity.getApplicationInterface().getStampPref().equals("preference_stamp_yes"); - view.setImageResource(enabled ? R.drawable.ic_text_format_red_48dp : R.drawable.ic_text_format_white_48dp); + view.setImageResource(R.drawable.ic_preference_text_format); + view.setImageTintList(ColorStateList.valueOf(main_activity.getResources().getColor(enabled ? R.color.color_default_accent : R.color.white))); view.setContentDescription(main_activity.getResources().getString(enabled ? R.string.stamp_disable : R.string.stamp_enable)); } public void updateAutoLevelIcon() { ImageButton view = main_activity.findViewById(R.id.auto_level); boolean enabled = main_activity.getApplicationInterface().getAutoStabilisePref(); - view.setImageResource(enabled ? R.drawable.auto_stabilise_icon_red : R.drawable.auto_stabilise_icon); + view.setImageResource(R.drawable.ic_preference_auto_stabilise); + view.setImageTintList(ColorStateList.valueOf(main_activity.getResources().getColor(enabled ? R.color.color_default_accent : R.color.white))); view.setContentDescription(main_activity.getResources().getString(enabled ? R.string.auto_level_disable : R.string.auto_level_enable)); } @@ -1290,38 +1228,39 @@ public class MainUI { if (flash_value != null) { switch (flash_value) { case "flash_off": - view.setImageResource(lineageos.platform.R.drawable.ic_camera_flash_off); + view.setImageResource(R.drawable.ic_camera_flash_off); break; case "flash_auto": case "flash_frontscreen_auto": - view.setImageResource(lineageos.platform.R.drawable.ic_camera_flash_auto); + view.setImageResource(R.drawable.ic_camera_flash_auto); break; case "flash_on": case "flash_frontscreen_on": - view.setImageResource(lineageos.platform.R.drawable.ic_camera_flash_on); + view.setImageResource(R.drawable.ic_camera_flash_on); break; case "flash_torch": case "flash_frontscreen_torch": - view.setImageResource(R.drawable.baseline_highlight_white_48); + view.setImageResource(R.drawable.ic_camera_highlight); break; case "flash_red_eye": - view.setImageResource(R.drawable.baseline_remove_red_eye_white_48); + view.setImageResource(R.drawable.ic_camera_remove_red_eye); break; default: // just in case?? Log.e(TAG, "unknown flash value " + flash_value); - view.setImageResource(lineageos.platform.R.drawable.ic_camera_flash_off); + view.setImageResource(R.drawable.ic_camera_flash_off); break; } } else { - view.setImageResource(lineageos.platform.R.drawable.ic_camera_flash_off); + view.setImageResource(R.drawable.ic_camera_flash_off); } } public void updateFaceDetectionIcon() { ImageButton view = main_activity.findViewById(R.id.face_detection); boolean enabled = main_activity.getApplicationInterface().getFaceDetectionPref(); - view.setImageResource(enabled ? R.drawable.ic_face_red_48dp : R.drawable.ic_face_white_48dp); + view.setImageResource(R.drawable.ic_face); + view.setImageTintList(ColorStateList.valueOf(main_activity.getResources().getColor(enabled ? R.color.color_default_accent : R.color.white))); view.setContentDescription(main_activity.getResources().getString(enabled ? R.string.face_detection_disable : R.string.face_detection_enable)); } @@ -1341,13 +1280,15 @@ public class MainUI { public void audioControlStarted() { ImageButton view = main_activity.findViewById(R.id.audio_control); - view.setImageResource(R.drawable.ic_mic_red_48dp); + view.setImageResource(R.drawable.ic_mic); + view.setImageTintList(ColorStateList.valueOf(main_activity.getResources().getColor(R.color.color_default_accent))); view.setContentDescription(main_activity.getResources().getString(R.string.audio_control_stop)); } public void audioControlStopped() { ImageButton view = main_activity.findViewById(R.id.audio_control); - view.setImageResource(R.drawable.ic_mic_white_48dp); + view.setImageResource(R.drawable.ic_mic); + view.setImageTintList(ColorStateList.valueOf(main_activity.getResources().getColor(R.color.white))); view.setContentDescription(main_activity.getResources().getString(R.string.audio_control_start)); } @@ -1755,8 +1696,8 @@ public class MainUI { final SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(main_activity); final Preview preview = main_activity.getPreview(); ImageButton view = main_activity.findViewById(R.id.exposure); - view.setImageResource(lineageos.platform.R.drawable.ic_camera_exposure); - view.setImageTintList(ColorStateList.valueOf(main_activity.getResources().getColor(lineageos.platform.R.color.color_default_red1))); + view.setImageResource(R.drawable.ic_camera_exposure); + view.setImageTintList(ColorStateList.valueOf(main_activity.getResources().getColor(R.color.color_default_accent))); View sliders_container = main_activity.findViewById(R.id.sliders_container); sliders_container.setVisibility(View.VISIBLE); ViewGroup iso_buttons_container = main_activity.findViewById(R.id.iso_buttons); @@ -1915,8 +1856,6 @@ public class MainUI { if (main_activity.getPreview().supportsExposures()) { exposure_seek_bar.setVisibility(View.VISIBLE); - ZoomControls seek_bar_zoom = main_activity.findViewById(R.id.exposure_seekbar_zoom); - seek_bar_zoom.setVisibility(View.VISIBLE); } else { exposure_seek_bar.setVisibility(View.GONE); } @@ -1982,7 +1921,7 @@ public class MainUI { SeekBar zoomSeekBar = main_activity.findViewById(R.id.zoom_seekbar); if (MyDebug.LOG) Log.d(TAG, "progress was: " + zoomSeekBar.getProgress()); - zoomSeekBar.setProgress(main_activity.getPreview().getMaxZoom() - new_zoom); + zoomSeekBar.setProgress(new_zoom); if (MyDebug.LOG) Log.d(TAG, "progress is now: " + zoomSeekBar.getProgress()); } @@ -2012,7 +1951,7 @@ public class MainUI { */ public void closeExposureUI() { ImageButton image_button = main_activity.findViewById(R.id.exposure); - image_button.setImageResource(lineageos.platform.R.drawable.ic_camera_exposure); + image_button.setImageResource(R.drawable.ic_camera_exposure); image_button.setImageTintList(ColorStateList.valueOf(Color.WHITE)); clearRemoteControlForExposureUI(); // must be called before we actually close the exposure panel View view = main_activity.findViewById(R.id.sliders_container); @@ -2037,15 +1976,15 @@ public class MainUI { if (main_activity.getMainUI().showCycleFlashIcon()) { popup.setImageResource(lineageos.platform.R.drawable.ic_menu); } else if (flash_value != null && flash_value.equals("flash_off")) { - popup.setImageResource(lineageos.platform.R.drawable.ic_camera_flash_off); + popup.setImageResource(R.drawable.popup_camera_flash_off); } else if (flash_value != null && (flash_value.equals("flash_torch") || flash_value.equals("flash_frontscreen_torch"))) { - popup.setImageResource(R.drawable.popup_flash_torch); + popup.setImageResource(R.drawable.popup_camera_flash_torch); } else if (flash_value != null && (flash_value.equals("flash_auto") || flash_value.equals("flash_frontscreen_auto"))) { - popup.setImageResource(lineageos.platform.R.drawable.ic_camera_flash_auto); + popup.setImageResource(R.drawable.popup_camera_flash_auto); } else if (flash_value != null && (flash_value.equals("flash_on") || flash_value.equals("flash_frontscreen_on"))) { - popup.setImageResource(lineageos.platform.R.drawable.ic_camera_flash_on); + popup.setImageResource(R.drawable.popup_camera_flash_on); } else if (flash_value != null && flash_value.equals("flash_red_eye")) { - popup.setImageResource(R.drawable.popup_flash_red_eye); + popup.setImageResource(R.drawable.popup_camera_flash_red_eye); } else { popup.setImageResource(lineageos.platform.R.drawable.ic_menu); } diff --git a/app/src/main/java/net/sourceforge/opencamera/ui/PopupView.java b/app/src/main/java/net/sourceforge/opencamera/ui/PopupView.java index e0fb50403a015f3ab84e92b39f436d127e766b6e..96435786e772587535bf9b1958e846d4d436673f 100644 --- a/app/src/main/java/net/sourceforge/opencamera/ui/PopupView.java +++ b/app/src/main/java/net/sourceforge/opencamera/ui/PopupView.java @@ -330,7 +330,7 @@ public class PopupView extends LinearLayout { LayoutParams.MATCH_PARENT ); final int left_padding = (int) (10 * scale + 0.5f); // convert dps to pixels - params.setMargins(left_padding, 0, 0, 0); + params.setMargins(left_padding, 20, 0, 40); checkBox.setLayoutParams(params); } @@ -1052,6 +1052,8 @@ public class PopupView extends LinearLayout { } } + + setBackgroundColor(getResources().getColor(R.color.color_popup_bg)); } int getTotalWidth() { @@ -1473,8 +1475,9 @@ public class PopupView extends LinearLayout { text_view.setGravity(Gravity.CENTER); text_view.setTextSize(TypedValue.COMPLEX_UNIT_DIP, title_text_size_dip); text_view.setTypeface(null, Typeface.BOLD); + text_view.setPadding(0, 5, 0, 5); //text_view.setBackgroundColor(Color.GRAY); // debug - text_view.setBackgroundColor(Color.argb(255, 33, 33, 33)); // Grey 900 + text_view.setBackgroundColor(getResources().getColor(R.color.color_popup_title_bg)); this.addView(text_view); } @@ -1516,12 +1519,50 @@ public class PopupView extends LinearLayout { final MainActivity main_activity = (MainActivity)this.getContext(); final long debug_time = System.nanoTime(); - final Button button = new Button(this.getContext()); - button.setBackgroundColor(Color.TRANSPARENT); // workaround for Android 6 crash! - button.setText(title + "..."); - button.setAllCaps(false); - button.setTextSize(TypedValue.COMPLEX_UNIT_DIP, title_text_size_dip); - this.addView(button); + LinearLayout ll = new LinearLayout(this.getContext()); + ll.setOrientation(LinearLayout.HORIZONTAL); + + final View dummyView = new View(this.getContext()); + dummyView.setBackgroundColor(Color.TRANSPARENT); + dummyView.setEnabled(false); + dummyView.setClickable(false); + ll.addView(dummyView); + ViewGroup.LayoutParams dummy_params = dummyView.getLayoutParams(); + dummy_params.width = arrow_button_w; + dummy_params.height = arrow_button_h; + dummyView.setLayoutParams(dummy_params); + + final TextView text_view = new TextView(this.getContext()); + text_view.setText(title); + text_view.setTextSize(TypedValue.COMPLEX_UNIT_DIP, standard_text_size_dip); + text_view.setTextColor(Color.WHITE); + text_view.setGravity(Gravity.CENTER); + text_view.setSingleLine(true); // if text too long for the button, we'd rather not have wordwrap, even if it means cutting some text off + LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT, 1.0f); + // Yuck! We want the arrow_button_w to be fairly large so that users can touch the arrow buttons easily, but if + // the text is too much for the button size, we'd rather it extend into the arrow buttons (which the user won't see + // anyway, since the button backgrounds are transparent). + // Needed for OnePlus 3T and Nokia 8, for camera resolution + params.setMargins(-arrow_button_w/2, arrow_button_h/4, -arrow_button_w/2, arrow_button_h/4); + text_view.setLayoutParams(params); + ll.addView(text_view); + + final float scale = getResources().getDisplayMetrics().density; + final int padding = (int) (0 * scale + 0.5f); // convert dps to pixels + final ImageButton down_button = new ImageButton(this.getContext()); + down_button.setEnabled(false); + down_button.setClickable(false); + down_button.setBackgroundColor(Color.TRANSPARENT); // workaround for Android 6 crash! + ll.addView(down_button); + down_button.setImageDrawable(this.getResources().getDrawable(R.drawable.ic_arrow_down)); + down_button.setPadding(padding, padding, padding, padding); + ViewGroup.LayoutParams vg_params = down_button.getLayoutParams(); + vg_params.width = arrow_button_w; + vg_params.height = arrow_button_h; + down_button.setLayoutParams(vg_params); + down_button.setContentDescription(title); + addView(ll); + if( MyDebug.LOG ) Log.d(TAG, "addRadioOptionsToPopup time 1: " + (System.nanoTime() - debug_time)); @@ -1532,7 +1573,7 @@ public class PopupView extends LinearLayout { if( MyDebug.LOG ) Log.d(TAG, "addRadioOptionsToPopup time 2: " + (System.nanoTime() - debug_time)); - button.setOnClickListener(new OnClickListener() { + ll.setOnClickListener(new OnClickListener() { private boolean opened = false; private boolean created = false; @@ -1705,6 +1746,10 @@ public class PopupView extends LinearLayout { LinearLayout ll2 = new LinearLayout(this.getContext()); ll2.setOrientation(LinearLayout.HORIZONTAL); + if( !title_in_options ) { + ll2.setPadding(0,40,0, 0); + } + final TextView text_view = new TextView(this.getContext()); setArrayOptionsText(supported_options, title, text_view, title_in_options, title_in_options_first_only, current_index); @@ -1718,17 +1763,15 @@ public class PopupView extends LinearLayout { // the text is too much for the button size, we'd rather it extend into the arrow buttons (which the user won't see // anyway, since the button backgrounds are transparent). // Needed for OnePlus 3T and Nokia 8, for camera resolution - params.setMargins(-arrow_button_w/2, 0, -arrow_button_w/2, 0); + params.setMargins(-arrow_button_w/2, arrow_button_h/4, -arrow_button_w/2, arrow_button_h/4); text_view.setLayoutParams(params); final float scale = getResources().getDisplayMetrics().density; final int padding = (int) (0 * scale + 0.5f); // convert dps to pixels - final Button prev_button = new Button(this.getContext()); + final ImageButton prev_button = new ImageButton(this.getContext()); prev_button.setBackgroundColor(Color.TRANSPARENT); // workaround for Android 6 crash! ll2.addView(prev_button); - prev_button.setText("<"); - prev_button.setTextSize(TypedValue.COMPLEX_UNIT_DIP, arrow_text_size_dip); - prev_button.setTypeface(null, Typeface.BOLD); + prev_button.setImageDrawable(this.getResources().getDrawable(R.drawable.ic_arrow_left)); prev_button.setPadding(padding, padding, padding, padding); ViewGroup.LayoutParams vg_params = prev_button.getLayoutParams(); vg_params.width = arrow_button_w; @@ -1741,12 +1784,10 @@ public class PopupView extends LinearLayout { ll2.addView(text_view); main_activity.getMainUI().getTestUIButtonsMap().put(test_key, text_view); - final Button next_button = new Button(this.getContext()); + final ImageButton next_button = new ImageButton(this.getContext()); next_button.setBackgroundColor(Color.TRANSPARENT); // workaround for Android 6 crash! ll2.addView(next_button); - next_button.setText(">"); - next_button.setTextSize(TypedValue.COMPLEX_UNIT_DIP, arrow_text_size_dip); - next_button.setTypeface(null, Typeface.BOLD); + next_button.setImageDrawable(this.getResources().getDrawable(R.drawable.ic_arrow_right)); next_button.setPadding(padding, padding, padding, padding); vg_params = next_button.getLayoutParams(); vg_params.width = arrow_button_w; diff --git a/app/src/main/res/drawable-mdpi/popup_flash_torch.png b/app/src/main/res/drawable-mdpi/popup_flash_torch.png deleted file mode 100644 index 8e3ae9c6d1e974d698879b85c3a9675b412766d6..0000000000000000000000000000000000000000 Binary files a/app/src/main/res/drawable-mdpi/popup_flash_torch.png and /dev/null differ diff --git a/app/src/main/res/drawable/bg_rounded_corner.xml b/app/src/main/res/drawable/bg_rounded_corner.xml new file mode 100644 index 0000000000000000000000000000000000000000..a89f1dc376fff39a0ece7bfcf8e35f2426e04288 --- /dev/null +++ b/app/src/main/res/drawable/bg_rounded_corner.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/bg_zoom_control.xml b/app/src/main/res/drawable/bg_zoom_control.xml new file mode 100644 index 0000000000000000000000000000000000000000..b183ccab147ea3b55272e9db678b4bb3f7ab97b5 --- /dev/null +++ b/app/src/main/res/drawable/bg_zoom_control.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_album.xml b/app/src/main/res/drawable/ic_album.xml new file mode 100644 index 0000000000000000000000000000000000000000..0d405e1b1b84cd0f2e29a730306c9c2ffea5669e --- /dev/null +++ b/app/src/main/res/drawable/ic_album.xml @@ -0,0 +1,16 @@ + + + + + + + diff --git a/app/src/main/res/drawable/ic_arrow_down.xml b/app/src/main/res/drawable/ic_arrow_down.xml new file mode 100644 index 0000000000000000000000000000000000000000..96e51169ce283dcf4bf5c1b3345cc562458350e2 --- /dev/null +++ b/app/src/main/res/drawable/ic_arrow_down.xml @@ -0,0 +1,11 @@ + + + diff --git a/app/src/main/res/drawable/ic_arrow_left.xml b/app/src/main/res/drawable/ic_arrow_left.xml new file mode 100644 index 0000000000000000000000000000000000000000..b6a971563d201f7bb4cba4d507fbd3e7ee47542c --- /dev/null +++ b/app/src/main/res/drawable/ic_arrow_left.xml @@ -0,0 +1,11 @@ + + + diff --git a/app/src/main/res/drawable/ic_arrow_right.xml b/app/src/main/res/drawable/ic_arrow_right.xml new file mode 100644 index 0000000000000000000000000000000000000000..0c95084abf7dec5a652f7be0133ab2bab68c72a5 --- /dev/null +++ b/app/src/main/res/drawable/ic_arrow_right.xml @@ -0,0 +1,11 @@ + + + diff --git a/app/src/main/res/drawable/ic_bluetooth.xml b/app/src/main/res/drawable/ic_bluetooth.xml new file mode 100644 index 0000000000000000000000000000000000000000..85527b80d251929bf460fd604c5b6be1c9e7b73f --- /dev/null +++ b/app/src/main/res/drawable/ic_bluetooth.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_camera_exposure.xml b/app/src/main/res/drawable/ic_camera_exposure.xml new file mode 100644 index 0000000000000000000000000000000000000000..a8c73ded02ee55c33e4c51ab18cdaedb512656c0 --- /dev/null +++ b/app/src/main/res/drawable/ic_camera_exposure.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_camera_exposure_locked.xml b/app/src/main/res/drawable/ic_camera_exposure_locked.xml new file mode 100644 index 0000000000000000000000000000000000000000..7df52645732c78ad04bed0652f108789a6e56d3b --- /dev/null +++ b/app/src/main/res/drawable/ic_camera_exposure_locked.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/drawable/ic_camera_exposure_unlocked.xml b/app/src/main/res/drawable/ic_camera_exposure_unlocked.xml new file mode 100644 index 0000000000000000000000000000000000000000..1bb92e9b19b36d3114e15e6279f055f29a88099f --- /dev/null +++ b/app/src/main/res/drawable/ic_camera_exposure_unlocked.xml @@ -0,0 +1,15 @@ + + + + + + + diff --git a/app/src/main/res/drawable/ic_camera_flash_auto.xml b/app/src/main/res/drawable/ic_camera_flash_auto.xml new file mode 100644 index 0000000000000000000000000000000000000000..05695cc5f486214746619e7d131c56da0bfe696e --- /dev/null +++ b/app/src/main/res/drawable/ic_camera_flash_auto.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_camera_flash_off.xml b/app/src/main/res/drawable/ic_camera_flash_off.xml new file mode 100644 index 0000000000000000000000000000000000000000..4f9de8fe8753d5941789b82d7758b5c44c5afef0 --- /dev/null +++ b/app/src/main/res/drawable/ic_camera_flash_off.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_camera_flash_on.xml b/app/src/main/res/drawable/ic_camera_flash_on.xml new file mode 100644 index 0000000000000000000000000000000000000000..f730d34875b70e16579f2fe8fb3373b00c392798 --- /dev/null +++ b/app/src/main/res/drawable/ic_camera_flash_on.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_camera_highlight.xml b/app/src/main/res/drawable/ic_camera_highlight.xml new file mode 100644 index 0000000000000000000000000000000000000000..9a40bbed8777575f29e0000c426a0121e9e7d115 --- /dev/null +++ b/app/src/main/res/drawable/ic_camera_highlight.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/drawable/ic_camera_remove_red_eye.xml b/app/src/main/res/drawable/ic_camera_remove_red_eye.xml new file mode 100644 index 0000000000000000000000000000000000000000..b2f4b848b78bda38828783f08c4cac9796717d94 --- /dev/null +++ b/app/src/main/res/drawable/ic_camera_remove_red_eye.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_camera_shutter.xml b/app/src/main/res/drawable/ic_camera_shutter.xml new file mode 100644 index 0000000000000000000000000000000000000000..9abbe1d59207dd0ca00edce1879569c00a95035c --- /dev/null +++ b/app/src/main/res/drawable/ic_camera_shutter.xml @@ -0,0 +1,14 @@ + + + + diff --git a/app/src/main/res/drawable/ic_camera_toggle.xml b/app/src/main/res/drawable/ic_camera_toggle.xml new file mode 100644 index 0000000000000000000000000000000000000000..56a26f6f078204ab9619ce16727543d209d6ed19 --- /dev/null +++ b/app/src/main/res/drawable/ic_camera_toggle.xml @@ -0,0 +1,16 @@ + + + + + + + diff --git a/app/src/main/res/drawable/ic_camera_video.xml b/app/src/main/res/drawable/ic_camera_video.xml new file mode 100644 index 0000000000000000000000000000000000000000..25ba545e7c62510864f7d6c4215d29f3f2eeff30 --- /dev/null +++ b/app/src/main/res/drawable/ic_camera_video.xml @@ -0,0 +1,14 @@ + + + + diff --git a/app/src/main/res/drawable/ic_camera_video_recording.xml b/app/src/main/res/drawable/ic_camera_video_recording.xml new file mode 100644 index 0000000000000000000000000000000000000000..6742eb6208eee0c28942dce071c03bbbe7a9f446 --- /dev/null +++ b/app/src/main/res/drawable/ic_camera_video_recording.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/app/src/main/res/drawable/ic_cancel.xml b/app/src/main/res/drawable/ic_cancel.xml new file mode 100644 index 0000000000000000000000000000000000000000..9421788a2cb864fc0d8c3df11067bc4f0fd71041 --- /dev/null +++ b/app/src/main/res/drawable/ic_cancel.xml @@ -0,0 +1,16 @@ + + + + + + + diff --git a/app/src/main/res/drawable/ic_colorize.xml b/app/src/main/res/drawable/ic_colorize.xml new file mode 100644 index 0000000000000000000000000000000000000000..62843bbfa9331638928a47ac9a607a95854455e9 --- /dev/null +++ b/app/src/main/res/drawable/ic_colorize.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_delete.xml b/app/src/main/res/drawable/ic_delete.xml new file mode 100644 index 0000000000000000000000000000000000000000..e2425de88f2194f521e327bb7db2341bbbf79e16 --- /dev/null +++ b/app/src/main/res/drawable/ic_delete.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_done.xml b/app/src/main/res/drawable/ic_done.xml new file mode 100644 index 0000000000000000000000000000000000000000..3b41c7d3bcebf92c9d3fcc6d2c8423a629ac39d9 --- /dev/null +++ b/app/src/main/res/drawable/ic_done.xml @@ -0,0 +1,16 @@ + + + + + + + diff --git a/app/src/main/res/drawable/ic_face.xml b/app/src/main/res/drawable/ic_face.xml new file mode 100644 index 0000000000000000000000000000000000000000..237304b838b088d9d9af7f941250b4f1bc86cef5 --- /dev/null +++ b/app/src/main/res/drawable/ic_face.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_focus_mode_auto.xml b/app/src/main/res/drawable/ic_focus_mode_auto.xml new file mode 100644 index 0000000000000000000000000000000000000000..d1e5e09b37dd35193bc208c3b557c827d77a7bd5 --- /dev/null +++ b/app/src/main/res/drawable/ic_focus_mode_auto.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_focus_mode_infinity.xml b/app/src/main/res/drawable/ic_focus_mode_infinity.xml new file mode 100644 index 0000000000000000000000000000000000000000..2aa6de86366383f4386dc850bfc5168810edc38e --- /dev/null +++ b/app/src/main/res/drawable/ic_focus_mode_infinity.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_focus_mode_locked.xml b/app/src/main/res/drawable/ic_focus_mode_locked.xml new file mode 100644 index 0000000000000000000000000000000000000000..2de1215b8740dfc9ecdb0f3513d7ed741798af93 --- /dev/null +++ b/app/src/main/res/drawable/ic_focus_mode_locked.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_focus_mode_macro.xml b/app/src/main/res/drawable/ic_focus_mode_macro.xml new file mode 100644 index 0000000000000000000000000000000000000000..83d8320cbef76bd251066ed1a70cc54dfc29526b --- /dev/null +++ b/app/src/main/res/drawable/ic_focus_mode_macro.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_iso.xml b/app/src/main/res/drawable/ic_iso.xml new file mode 100644 index 0000000000000000000000000000000000000000..91a35703861132ee3ed399b184e42184ecf9ded9 --- /dev/null +++ b/app/src/main/res/drawable/ic_iso.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_mic.xml b/app/src/main/res/drawable/ic_mic.xml new file mode 100644 index 0000000000000000000000000000000000000000..4f1fe082eeba7e0ebba2eddb09f43fd99bfda901 --- /dev/null +++ b/app/src/main/res/drawable/ic_mic.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/app/src/main/res/drawable/ic_more.xml b/app/src/main/res/drawable/ic_more.xml new file mode 100644 index 0000000000000000000000000000000000000000..97dc40fe7c142d7b61d81b89096617604470700f --- /dev/null +++ b/app/src/main/res/drawable/ic_more.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_pause.xml b/app/src/main/res/drawable/ic_pause.xml index 936e4ea221cad01690f8ae8a26495d67b32576b9..7e719d8e08c0b7c8b14f259bc3c4a2059961cce0 100644 --- a/app/src/main/res/drawable/ic_pause.xml +++ b/app/src/main/res/drawable/ic_pause.xml @@ -1,5 +1,16 @@ - - + + + + + + diff --git a/app/src/main/res/drawable/ic_play.xml b/app/src/main/res/drawable/ic_play.xml new file mode 100644 index 0000000000000000000000000000000000000000..c1997c45034dfd9cfceae72c73c2266e1036e87f --- /dev/null +++ b/app/src/main/res/drawable/ic_play.xml @@ -0,0 +1,16 @@ + + + + + + + diff --git a/app/src/main/res/drawable/ic_preference_auto_stabilise.xml b/app/src/main/res/drawable/ic_preference_auto_stabilise.xml new file mode 100644 index 0000000000000000000000000000000000000000..71b5fe40d57e46b3b84f2b123fb6c28cc32e2026 --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_auto_stabilise.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_preference_camera_flash_on.xml b/app/src/main/res/drawable/ic_preference_camera_flash_on.xml new file mode 100644 index 0000000000000000000000000000000000000000..58b60758f71ba15d4e7fcf2111fc5509c2f03cbc --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_camera_flash_on.xml @@ -0,0 +1,10 @@ + + + + diff --git a/app/src/main/res/drawable/ic_preference_camera_preview.xml b/app/src/main/res/drawable/ic_preference_camera_preview.xml new file mode 100644 index 0000000000000000000000000000000000000000..dff67e47f7fc2f4f20e80ba8366562c18ec1d30d --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_camera_preview.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_preference_cog.xml b/app/src/main/res/drawable/ic_preference_cog.xml new file mode 100644 index 0000000000000000000000000000000000000000..394f1a119ab36174dcd2a6c540b26e1bc20d844e --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_cog.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_preference_exposure_unlocked.xml b/app/src/main/res/drawable/ic_preference_exposure_unlocked.xml new file mode 100644 index 0000000000000000000000000000000000000000..847fac1ee7bf70f2601b26d1a288cd60014e0f08 --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_exposure_unlocked.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/drawable/ic_preference_face.xml b/app/src/main/res/drawable/ic_preference_face.xml new file mode 100644 index 0000000000000000000000000000000000000000..fa07ae306fb9867afb3a286f195546edbdbd03d1 --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_face.xml @@ -0,0 +1,10 @@ + + + + diff --git a/app/src/main/res/drawable/ic_preference_folder_open.xml b/app/src/main/res/drawable/ic_preference_folder_open.xml new file mode 100644 index 0000000000000000000000000000000000000000..7b88044b2926a014c889f7a63d38f9991bc2124e --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_folder_open.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_preference_help.xml b/app/src/main/res/drawable/ic_preference_help.xml new file mode 100644 index 0000000000000000000000000000000000000000..290197c0549131a66e6f81aa28caebf9dd0b3267 --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_help.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_preference_info.xml b/app/src/main/res/drawable/ic_preference_info.xml new file mode 100644 index 0000000000000000000000000000000000000000..a9e537021a910ab66bb43fe7f7e9fa320f476702 --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_info.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_preference_location.xml b/app/src/main/res/drawable/ic_preference_location.xml new file mode 100644 index 0000000000000000000000000000000000000000..a3e877e760086ed524c80fa9c50b1ce4144d2f9e --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_location.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_preference_mic.xml b/app/src/main/res/drawable/ic_preference_mic.xml new file mode 100644 index 0000000000000000000000000000000000000000..c1046645ecf825f03bf37a674881439789ea582b --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_mic.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/drawable/ic_preference_more_horizontal.xml b/app/src/main/res/drawable/ic_preference_more_horizontal.xml new file mode 100644 index 0000000000000000000000000000000000000000..b3663c74d011d19bd1782e1f5cbad602f45fc3ae --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_more_horizontal.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_preference_on_screen_gui.xml b/app/src/main/res/drawable/ic_preference_on_screen_gui.xml new file mode 100644 index 0000000000000000000000000000000000000000..4b6796e490503c72ff07eea09ae4e780bd362a16 --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_on_screen_gui.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_preference_photo_settings.xml b/app/src/main/res/drawable/ic_preference_photo_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..fae1ec549b4dc787aba04de6ae552d944ad29e85 --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_photo_settings.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_preference_photo_size_select.xml b/app/src/main/res/drawable/ic_preference_photo_size_select.xml new file mode 100644 index 0000000000000000000000000000000000000000..5d40ece83c42e40d376841a88544d080be6739f6 --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_photo_size_select.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_preference_power.xml b/app/src/main/res/drawable/ic_preference_power.xml new file mode 100644 index 0000000000000000000000000000000000000000..2c4b973fba397c069fe5e96ddf0d3591b832040c --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_power.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_preference_processing.xml b/app/src/main/res/drawable/ic_preference_processing.xml new file mode 100644 index 0000000000000000000000000000000000000000..af29186f025d7d6204c218722d280ad70b39a884 --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_processing.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/app/src/main/res/drawable/ic_preference_save.xml b/app/src/main/res/drawable/ic_preference_save.xml new file mode 100644 index 0000000000000000000000000000000000000000..560333a545195b72ffe948eeb6084f35299f02c3 --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_save.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_preference_text_format.xml b/app/src/main/res/drawable/ic_preference_text_format.xml new file mode 100644 index 0000000000000000000000000000000000000000..f8ad413e1fef94fb949bb6cea2e865dc9a6ac590 --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_text_format.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_preference_text_stamp.xml b/app/src/main/res/drawable/ic_preference_text_stamp.xml new file mode 100644 index 0000000000000000000000000000000000000000..16280799362a01cbff4d1919d7640a3d25ca7a7a --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_text_stamp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_preference_timer.xml b/app/src/main/res/drawable/ic_preference_timer.xml new file mode 100644 index 0000000000000000000000000000000000000000..d71a2d7da35d76784e2507d739a3d074f491916e --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_timer.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_preference_touch_app.xml b/app/src/main/res/drawable/ic_preference_touch_app.xml new file mode 100644 index 0000000000000000000000000000000000000000..30a1ec5aefa00ac778e03fc0b254b75548a4e4ae --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_touch_app.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_preference_video_settings.xml b/app/src/main/res/drawable/ic_preference_video_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..761ecc0fb5b4234baca19f600dc5506ee9c0b6b2 --- /dev/null +++ b/app/src/main/res/drawable/ic_preference_video_settings.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_raw.xml b/app/src/main/res/drawable/ic_raw.xml new file mode 100644 index 0000000000000000000000000000000000000000..7020a3f0735af63d3d908aee25a2fca11c81902a --- /dev/null +++ b/app/src/main/res/drawable/ic_raw.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/app/src/main/res/drawable/ic_settings.xml b/app/src/main/res/drawable/ic_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..5ff6fec08246c8a7049c2aed8034b53778971e3f --- /dev/null +++ b/app/src/main/res/drawable/ic_settings.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_share.xml b/app/src/main/res/drawable/ic_share.xml new file mode 100644 index 0000000000000000000000000000000000000000..fcb75da983bf7841a05138c2bdeb88f451c6fb7b --- /dev/null +++ b/app/src/main/res/drawable/ic_share.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_shutter_speed.xml b/app/src/main/res/drawable/ic_shutter_speed.xml new file mode 100644 index 0000000000000000000000000000000000000000..074469888d29a88837883834ec8e722eb2bb9693 --- /dev/null +++ b/app/src/main/res/drawable/ic_shutter_speed.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_switch_camera.xml b/app/src/main/res/drawable/ic_switch_camera.xml new file mode 100644 index 0000000000000000000000000000000000000000..3c2171f74b02d5b4a1d4aa267d0b6157252fd28c --- /dev/null +++ b/app/src/main/res/drawable/ic_switch_camera.xml @@ -0,0 +1,16 @@ + + + + + + + diff --git a/app/src/main/res/drawable/ic_switch_multi_camera.xml b/app/src/main/res/drawable/ic_switch_multi_camera.xml new file mode 100644 index 0000000000000000000000000000000000000000..8d17d926693a8f1f45077dc4b5e82bb8105ee2ac --- /dev/null +++ b/app/src/main/res/drawable/ic_switch_multi_camera.xml @@ -0,0 +1,25 @@ + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_switch_video.xml b/app/src/main/res/drawable/ic_switch_video.xml new file mode 100644 index 0000000000000000000000000000000000000000..07b801e2ccdb3d9f1951d0353b693169d313c331 --- /dev/null +++ b/app/src/main/res/drawable/ic_switch_video.xml @@ -0,0 +1,16 @@ + + + + + + + diff --git a/app/src/main/res/drawable/ic_text_stamp.xml b/app/src/main/res/drawable/ic_text_stamp.xml new file mode 100644 index 0000000000000000000000000000000000000000..c8116a0863561393d58246f11e9f0505ab88846f --- /dev/null +++ b/app/src/main/res/drawable/ic_text_stamp.xml @@ -0,0 +1,10 @@ + + + + diff --git a/app/src/main/res/drawable/ic_white_balance_unlocked.xml b/app/src/main/res/drawable/ic_white_balance_unlocked.xml new file mode 100644 index 0000000000000000000000000000000000000000..6f2d66a44f0e4da1c72dd4de667eeeefeeeaa823 --- /dev/null +++ b/app/src/main/res/drawable/ic_white_balance_unlocked.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_zoom_in.xml b/app/src/main/res/drawable/ic_zoom_in.xml new file mode 100644 index 0000000000000000000000000000000000000000..3871a062cca0bf28bc89598f7d0d96afd26fc526 --- /dev/null +++ b/app/src/main/res/drawable/ic_zoom_in.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_zoom_out.xml b/app/src/main/res/drawable/ic_zoom_out.xml new file mode 100644 index 0000000000000000000000000000000000000000..09772974334cad9a5454f2f403d9c3fe02e16a6b --- /dev/null +++ b/app/src/main/res/drawable/ic_zoom_out.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/popup_camera_flash_auto.xml b/app/src/main/res/drawable/popup_camera_flash_auto.xml new file mode 100644 index 0000000000000000000000000000000000000000..b724899fb51e0becbf95d7d13ad70b33866f8e55 --- /dev/null +++ b/app/src/main/res/drawable/popup_camera_flash_auto.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/app/src/main/res/drawable/popup_camera_flash_off.xml b/app/src/main/res/drawable/popup_camera_flash_off.xml new file mode 100644 index 0000000000000000000000000000000000000000..a20462a3aa2758f30a2f187061557e813e2e3f9f --- /dev/null +++ b/app/src/main/res/drawable/popup_camera_flash_off.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/app/src/main/res/drawable/popup_camera_flash_on.xml b/app/src/main/res/drawable/popup_camera_flash_on.xml new file mode 100644 index 0000000000000000000000000000000000000000..c73583d0ba01e9bfeab7aa49e3e0daacc6b5da3c --- /dev/null +++ b/app/src/main/res/drawable/popup_camera_flash_on.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/app/src/main/res/drawable/popup_camera_flash_red_eye.xml b/app/src/main/res/drawable/popup_camera_flash_red_eye.xml new file mode 100644 index 0000000000000000000000000000000000000000..ccbbeb3fca732e3de3b2d27b8c37d99d3de13e5d --- /dev/null +++ b/app/src/main/res/drawable/popup_camera_flash_red_eye.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/app/src/main/res/drawable/popup_camera_flash_torch.xml b/app/src/main/res/drawable/popup_camera_flash_torch.xml new file mode 100644 index 0000000000000000000000000000000000000000..c7be3adbee4658ba814cebe8a06de25f636345d3 --- /dev/null +++ b/app/src/main/res/drawable/popup_camera_flash_torch.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/app/src/main/res/drawable/shortcut_gallery.xml b/app/src/main/res/drawable/shortcut_gallery.xml index 08c97fc630047e0c33f0759079f275bc9d50239d..c2a944fda131208b2ab66ee52cbcf144209078b8 100644 --- a/app/src/main/res/drawable/shortcut_gallery.xml +++ b/app/src/main/res/drawable/shortcut_gallery.xml @@ -2,8 +2,8 @@ - + - + diff --git a/app/src/main/res/drawable/shortcut_ic_face_white_48dp.xml b/app/src/main/res/drawable/shortcut_ic_face_white_48dp.xml index 61087dd69a55a4c18b83cf98a49ce1e95eeac5aa..efb3e4cdf36eda747151a5163bb1644fb6cd773f 100644 --- a/app/src/main/res/drawable/shortcut_ic_face_white_48dp.xml +++ b/app/src/main/res/drawable/shortcut_ic_face_white_48dp.xml @@ -2,8 +2,8 @@ - + - + diff --git a/app/src/main/res/drawable/shortcut_ic_photo_camera_white_48dp.xml b/app/src/main/res/drawable/shortcut_ic_photo_camera_white_48dp.xml index 439f19a6b5b7421a42fc6843f6932225deb9b0cb..507715e75a244b97502b87dabfde8c91a42d5496 100644 --- a/app/src/main/res/drawable/shortcut_ic_photo_camera_white_48dp.xml +++ b/app/src/main/res/drawable/shortcut_ic_photo_camera_white_48dp.xml @@ -2,8 +2,8 @@ - + - + diff --git a/app/src/main/res/drawable/shortcut_ic_videocam_white_48dp.xml b/app/src/main/res/drawable/shortcut_ic_videocam_white_48dp.xml index abc44e2aabbd4401f93c4fc51e198e2dcf642118..c9a5de9969fd68ac6c319cf96ab443b09392e545 100644 --- a/app/src/main/res/drawable/shortcut_ic_videocam_white_48dp.xml +++ b/app/src/main/res/drawable/shortcut_ic_videocam_white_48dp.xml @@ -2,7 +2,7 @@ - + diff --git a/app/src/main/res/drawable/shortcut_settings.xml b/app/src/main/res/drawable/shortcut_settings.xml index ce47d408f8dad7fca76791fc2688744437588f8c..493fda4250f1eb4528afc3a9de41158a6f7d0bab 100644 --- a/app/src/main/res/drawable/shortcut_settings.xml +++ b/app/src/main/res/drawable/shortcut_settings.xml @@ -2,8 +2,8 @@ - + - + diff --git a/app/src/main/res/drawable/take_photo_selector.xml b/app/src/main/res/drawable/take_photo_selector.xml index 5777bb2e007972c756792cc338775ac4e40ca78d..c269c22820fb1bb569d4a8be2eb1b436bed96dd5 100644 --- a/app/src/main/res/drawable/take_photo_selector.xml +++ b/app/src/main/res/drawable/take_photo_selector.xml @@ -1,6 +1,6 @@ - + android:drawable="@drawable/ic_camera_shutter" /> + diff --git a/app/src/main/res/drawable/take_photo_when_video_recording.xml b/app/src/main/res/drawable/take_photo_when_video_recording.xml index 2b58aab91be491253c2e45078aca856e0fefeaf8..8e740588fcc02ba01c9770bd4a1d876fc09f2280 100644 --- a/app/src/main/res/drawable/take_photo_when_video_recording.xml +++ b/app/src/main/res/drawable/take_photo_when_video_recording.xml @@ -6,7 +6,7 @@ android:width="4.5dp"/> - - + diff --git a/app/src/main/res/drawable/take_video_selector.xml b/app/src/main/res/drawable/take_video_selector.xml index 5777bb2e007972c756792cc338775ac4e40ca78d..c269c22820fb1bb569d4a8be2eb1b436bed96dd5 100644 --- a/app/src/main/res/drawable/take_video_selector.xml +++ b/app/src/main/res/drawable/take_video_selector.xml @@ -1,6 +1,6 @@ - + android:drawable="@drawable/ic_camera_shutter" /> + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 45f6dd85324ce1e061eb16729345811b60c7d928..036ab9b018ea4e1fa4f0c34761c47f56cefa168d 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,8 +1,9 @@ + tools:context="net.sourceforge.opencamera.MainActivity"> - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + android:layout_width="112dp" + android:layout_height="38dp" + android:background="@drawable/bg_zoom_control" + android:layout_toEndOf="@id/top_bg" + android:layout_marginStart="25dp" + android:layout_centerVertical="true" + android:contentDescription="@string/zoom"> + + + + + + + + + android:gravity="center|end" + android:orientation="horizontal"> + + + android:rotation="270" /> @@ -139,7 +236,7 @@ android:layout_marginTop="0dp" android:layout_marginRight="0dp" android:layout_marginBottom="0dp" - android:background="@color/seekbar_background" + android:background="@drawable/bg_rounded_corner" android:contentDescription="@string/focus_distance" android:visibility="gone" /> @@ -152,7 +249,7 @@ android:layout_marginTop="0dp" android:layout_marginRight="0dp" android:layout_marginBottom="0dp" - android:background="@color/seekbar_background" + android:background="@drawable/bg_rounded_corner" android:contentDescription="@string/focus_bracketing_target_distance" android:visibility="gone" /> @@ -164,30 +261,6 @@ android:scaleType="fitCenter" android:visibility="invisible" /> - - - - + android:src="@drawable/ic_settings" /> + android:src="@drawable/ic_more" /> @@ -268,39 +338,11 @@ android:background="@null" android:contentDescription="@string/preference_location_enable" android:onClick="clickedStoreLocation" - android:padding="12dp" + android:padding="@dimen/onscreen_button_padding" android:scaleType="fitCenter" - android:src="@drawable/ic_gps_fixed_white_48dp" + android:src="@drawable/ic_preference_location" android:visibility="gone" /> - - - - @@ -398,9 +439,9 @@ android:backgroundTintMode="src_in" android:contentDescription="@string/trash" android:onClick="clickedTrash" - android:padding="12dp" + android:padding="@dimen/onscreen_button_padding" android:scaleType="fitCenter" - android:src="@lineageos.platform:drawable/ic_bin" + android:src="@drawable/ic_delete" android:visibility="gone" /> @@ -437,7 +481,7 @@ android:id="@+id/iso_buttons" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center"> + android:layout_gravity="center"/> @@ -453,8 +497,7 @@ android:layout_width="30dp" android:layout_height="30dp" android:contentDescription="@string/exposure_compensation" - android:src="@lineageos.platform:drawable/ic_camera_exposure" - android:tint="@color/white" /> + android:src="@drawable/ic_camera_exposure" /> - - + android:src="@drawable/ic_iso" /> + android:src="@drawable/ic_shutter_speed" /> + android:src="@drawable/ic_colorize" /> - diff --git a/app/src/main/res/layout/custom_preference_list.xml b/app/src/main/res/layout/custom_preference_list.xml new file mode 100644 index 0000000000000000000000000000000000000000..e7d54731326d3463499996c28a475a8789c51f54 --- /dev/null +++ b/app/src/main/res/layout/custom_preference_list.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + +