From bdff44ef9bfec9302eda647e1d42034b9bd0f6eb Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Wed, 30 Mar 2022 21:42:53 +0600 Subject: [PATCH 01/15] 94-UI_improvement issue: https://gitlab.e.foundation/e/os/backlog/-/issues/94 Revamp UI, fix ui related bugs --- app/build.gradle | 4 + app/src/main/AndroidManifest.xml | 6 +- .../sourceforge/opencamera/MainActivity.java | 22 ++- .../opencamera/MyApplicationInterface.java | 2 +- .../opencamera/MyPreferenceFragment.java | 10 ++ .../opencamera/preview/Preview.java | 4 +- .../opencamera/ui/DrawPreview.java | 34 ++--- .../net/sourceforge/opencamera/ui/MainUI.java | 92 ++++++------ .../sourceforge/opencamera/ui/PopupView.java | 78 +++++++--- .../res/drawable-mdpi/popup_flash_torch.png | Bin 1060 -> 0 bytes .../main/res/drawable/bg_rounded_corner.xml | 8 + app/src/main/res/drawable/ic_album.xml | 16 ++ app/src/main/res/drawable/ic_arrow_down.xml | 11 ++ app/src/main/res/drawable/ic_arrow_left.xml | 11 ++ app/src/main/res/drawable/ic_arrow_right.xml | 11 ++ app/src/main/res/drawable/ic_bluetooth.xml | 9 ++ .../main/res/drawable/ic_camera_exposure.xml | 9 ++ .../drawable/ic_camera_exposure_locked.xml | 12 ++ .../drawable/ic_camera_exposure_unlocked.xml | 12 ++ .../res/drawable/ic_camera_flash_auto.xml | 9 ++ .../main/res/drawable/ic_camera_flash_off.xml | 9 ++ .../main/res/drawable/ic_camera_flash_on.xml | 9 ++ .../main/res/drawable/ic_camera_highlight.xml | 12 ++ .../res/drawable/ic_camera_remove_red_eye.xml | 9 ++ .../main/res/drawable/ic_camera_shutter.xml | 14 ++ .../main/res/drawable/ic_camera_toggle.xml | 16 ++ app/src/main/res/drawable/ic_camera_video.xml | 14 ++ .../drawable/ic_camera_video_recording.xml | 18 +++ app/src/main/res/drawable/ic_cancel.xml | 16 ++ app/src/main/res/drawable/ic_colorize.xml | 9 ++ app/src/main/res/drawable/ic_delete.xml | 9 ++ app/src/main/res/drawable/ic_done.xml | 16 ++ app/src/main/res/drawable/ic_face.xml | 9 ++ .../main/res/drawable/ic_focus_mode_auto.xml | 9 ++ .../res/drawable/ic_focus_mode_infinity.xml | 9 ++ .../res/drawable/ic_focus_mode_locked.xml | 9 ++ .../main/res/drawable/ic_focus_mode_macro.xml | 9 ++ app/src/main/res/drawable/ic_iso.xml | 9 ++ app/src/main/res/drawable/ic_mic.xml | 13 ++ app/src/main/res/drawable/ic_more.xml | 9 ++ app/src/main/res/drawable/ic_pause.xml | 19 ++- app/src/main/res/drawable/ic_play.xml | 16 ++ .../drawable/ic_preference_auto_stabilise.xml | 9 ++ .../ic_preference_camera_flash_on.xml | 10 ++ .../drawable/ic_preference_camera_preview.xml | 9 ++ .../main/res/drawable/ic_preference_cog.xml | 9 ++ .../ic_preference_exposure_unlocked.xml | 12 ++ .../main/res/drawable/ic_preference_face.xml | 10 ++ .../drawable/ic_preference_folder_open.xml | 9 ++ .../main/res/drawable/ic_preference_help.xml | 10 ++ .../main/res/drawable/ic_preference_info.xml | 9 ++ .../res/drawable/ic_preference_location.xml | 9 ++ .../main/res/drawable/ic_preference_mic.xml | 12 ++ .../ic_preference_more_horizontal.xml | 9 ++ .../drawable/ic_preference_on_screen_gui.xml | 9 ++ .../drawable/ic_preference_photo_settings.xml | 9 ++ .../ic_preference_photo_size_select.xml | 9 ++ .../main/res/drawable/ic_preference_power.xml | 9 ++ .../res/drawable/ic_preference_processing.xml | 18 +++ .../main/res/drawable/ic_preference_save.xml | 9 ++ .../drawable/ic_preference_text_format.xml | 9 ++ .../res/drawable/ic_preference_text_stamp.xml | 9 ++ .../main/res/drawable/ic_preference_timer.xml | 9 ++ .../res/drawable/ic_preference_touch_app.xml | 9 ++ .../drawable/ic_preference_video_settings.xml | 9 ++ app/src/main/res/drawable/ic_raw.xml | 15 ++ app/src/main/res/drawable/ic_settings.xml | 9 ++ app/src/main/res/drawable/ic_share.xml | 9 ++ .../main/res/drawable/ic_shutter_speed.xml | 9 ++ .../main/res/drawable/ic_switch_camera.xml | 16 ++ .../res/drawable/ic_switch_multi_camera.xml | 25 ++++ app/src/main/res/drawable/ic_switch_video.xml | 16 ++ app/src/main/res/drawable/ic_text_stamp.xml | 10 ++ .../drawable/ic_white_balance_unlocked.xml | 9 ++ app/src/main/res/drawable/ic_zoom_in.xml | 11 ++ .../res/drawable/popup_camera_flash_auto.xml | 12 ++ .../res/drawable/popup_camera_flash_off.xml | 12 ++ .../res/drawable/popup_camera_flash_on.xml | 12 ++ .../drawable/popup_camera_flash_red_eye.xml | 12 ++ .../res/drawable/popup_camera_flash_torch.xml | 15 ++ .../main/res/drawable/shortcut_gallery.xml | 4 +- .../drawable/shortcut_ic_face_white_48dp.xml | 4 +- .../shortcut_ic_photo_camera_white_48dp.xml | 4 +- .../shortcut_ic_videocam_white_48dp.xml | 2 +- .../main/res/drawable/shortcut_settings.xml | 4 +- .../main/res/drawable/take_photo_selector.xml | 4 +- .../take_photo_when_video_recording.xml | 2 +- .../res/drawable/take_video_recording.xml | 2 +- .../main/res/drawable/take_video_selector.xml | 4 +- app/src/main/res/layout/activity_main.xml | 138 ++++++++++-------- .../res/layout/custom_preference_list.xml | 69 +++++++++ app/src/main/res/values-v21/styles.xml | 17 ++- app/src/main/res/values/arrays.xml | 24 +-- app/src/main/res/values/colors.xml | 14 +- app/src/main/res/values/dimens.xml | 2 +- app/src/main/res/values/strings.xml | 3 + app/src/main/res/xml/preferences.xml | 64 ++++---- e-ui-sdk.jar | Bin 124472 -> 117069 bytes 98 files changed, 1158 insertions(+), 242 deletions(-) delete mode 100644 app/src/main/res/drawable-mdpi/popup_flash_torch.png create mode 100644 app/src/main/res/drawable/bg_rounded_corner.xml create mode 100644 app/src/main/res/drawable/ic_album.xml create mode 100644 app/src/main/res/drawable/ic_arrow_down.xml create mode 100644 app/src/main/res/drawable/ic_arrow_left.xml create mode 100644 app/src/main/res/drawable/ic_arrow_right.xml create mode 100644 app/src/main/res/drawable/ic_bluetooth.xml create mode 100644 app/src/main/res/drawable/ic_camera_exposure.xml create mode 100644 app/src/main/res/drawable/ic_camera_exposure_locked.xml create mode 100644 app/src/main/res/drawable/ic_camera_exposure_unlocked.xml create mode 100644 app/src/main/res/drawable/ic_camera_flash_auto.xml create mode 100644 app/src/main/res/drawable/ic_camera_flash_off.xml create mode 100644 app/src/main/res/drawable/ic_camera_flash_on.xml create mode 100644 app/src/main/res/drawable/ic_camera_highlight.xml create mode 100644 app/src/main/res/drawable/ic_camera_remove_red_eye.xml create mode 100644 app/src/main/res/drawable/ic_camera_shutter.xml create mode 100644 app/src/main/res/drawable/ic_camera_toggle.xml create mode 100644 app/src/main/res/drawable/ic_camera_video.xml create mode 100644 app/src/main/res/drawable/ic_camera_video_recording.xml create mode 100644 app/src/main/res/drawable/ic_cancel.xml create mode 100644 app/src/main/res/drawable/ic_colorize.xml create mode 100644 app/src/main/res/drawable/ic_delete.xml create mode 100644 app/src/main/res/drawable/ic_done.xml create mode 100644 app/src/main/res/drawable/ic_face.xml create mode 100644 app/src/main/res/drawable/ic_focus_mode_auto.xml create mode 100644 app/src/main/res/drawable/ic_focus_mode_infinity.xml create mode 100644 app/src/main/res/drawable/ic_focus_mode_locked.xml create mode 100644 app/src/main/res/drawable/ic_focus_mode_macro.xml create mode 100644 app/src/main/res/drawable/ic_iso.xml create mode 100644 app/src/main/res/drawable/ic_mic.xml create mode 100644 app/src/main/res/drawable/ic_more.xml create mode 100644 app/src/main/res/drawable/ic_play.xml create mode 100644 app/src/main/res/drawable/ic_preference_auto_stabilise.xml create mode 100644 app/src/main/res/drawable/ic_preference_camera_flash_on.xml create mode 100644 app/src/main/res/drawable/ic_preference_camera_preview.xml create mode 100644 app/src/main/res/drawable/ic_preference_cog.xml create mode 100644 app/src/main/res/drawable/ic_preference_exposure_unlocked.xml create mode 100644 app/src/main/res/drawable/ic_preference_face.xml create mode 100644 app/src/main/res/drawable/ic_preference_folder_open.xml create mode 100644 app/src/main/res/drawable/ic_preference_help.xml create mode 100644 app/src/main/res/drawable/ic_preference_info.xml create mode 100644 app/src/main/res/drawable/ic_preference_location.xml create mode 100644 app/src/main/res/drawable/ic_preference_mic.xml create mode 100644 app/src/main/res/drawable/ic_preference_more_horizontal.xml create mode 100644 app/src/main/res/drawable/ic_preference_on_screen_gui.xml create mode 100644 app/src/main/res/drawable/ic_preference_photo_settings.xml create mode 100644 app/src/main/res/drawable/ic_preference_photo_size_select.xml create mode 100644 app/src/main/res/drawable/ic_preference_power.xml create mode 100644 app/src/main/res/drawable/ic_preference_processing.xml create mode 100644 app/src/main/res/drawable/ic_preference_save.xml create mode 100644 app/src/main/res/drawable/ic_preference_text_format.xml create mode 100644 app/src/main/res/drawable/ic_preference_text_stamp.xml create mode 100644 app/src/main/res/drawable/ic_preference_timer.xml create mode 100644 app/src/main/res/drawable/ic_preference_touch_app.xml create mode 100644 app/src/main/res/drawable/ic_preference_video_settings.xml create mode 100644 app/src/main/res/drawable/ic_raw.xml create mode 100644 app/src/main/res/drawable/ic_settings.xml create mode 100644 app/src/main/res/drawable/ic_share.xml create mode 100644 app/src/main/res/drawable/ic_shutter_speed.xml create mode 100644 app/src/main/res/drawable/ic_switch_camera.xml create mode 100644 app/src/main/res/drawable/ic_switch_multi_camera.xml create mode 100644 app/src/main/res/drawable/ic_switch_video.xml create mode 100644 app/src/main/res/drawable/ic_text_stamp.xml create mode 100644 app/src/main/res/drawable/ic_white_balance_unlocked.xml create mode 100644 app/src/main/res/drawable/ic_zoom_in.xml create mode 100644 app/src/main/res/drawable/popup_camera_flash_auto.xml create mode 100644 app/src/main/res/drawable/popup_camera_flash_off.xml create mode 100644 app/src/main/res/drawable/popup_camera_flash_on.xml create mode 100644 app/src/main/res/drawable/popup_camera_flash_red_eye.xml create mode 100644 app/src/main/res/drawable/popup_camera_flash_torch.xml create mode 100644 app/src/main/res/layout/custom_preference_list.xml diff --git a/app/build.gradle b/app/build.gradle index c2ae63e51..7b4151d6e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -19,6 +19,10 @@ android { } buildTypes { + debug { + applicationIdSuffix ".debug" + } + release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 03a33c13e..122afea9a 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -123,7 +123,7 @@ @@ -133,7 +133,7 @@ @@ -143,7 +143,7 @@ diff --git a/app/src/main/java/net/sourceforge/opencamera/MainActivity.java b/app/src/main/java/net/sourceforge/opencamera/MainActivity.java index 27553fcea..1c3e55dc3 100644 --- a/app/src/main/java/net/sourceforge/opencamera/MainActivity.java +++ b/app/src/main/java/net/sourceforge/opencamera/MainActivity.java @@ -414,6 +414,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(); @@ -2967,7 +2969,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 +2984,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; } @@ -4042,6 +4046,7 @@ public class MainActivity extends Activity { Log.d(TAG, "has_zoom? " + preview.supportsZoom()); ZoomControls zoomControls = 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) ) { @@ -4093,15 +4098,18 @@ public class MainActivity extends Activity { if( sharedPreferences.getBoolean(PreferenceKeys.ShowZoomSliderControlsPreferenceKey, true) ) { 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); 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 +4231,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 5e608b5fe..8820143c6 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 379262801..1b2c68611 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 android.support.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/preview/Preview.java b/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java index c1b346791..68296c443 100644 --- a/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java +++ b/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java @@ -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(Color.parseColor("#61000000")); 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/ui/DrawPreview.java b/app/src/main/java/net/sourceforge/opencamera/ui/DrawPreview.java index 77e41e356..33fca7baa 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; @@ -164,7 +163,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 +172,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 +255,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 +264,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 +296,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 +331,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(); @@ -1364,7 +1357,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 +1374,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 +1523,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 { 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 db3404580..f69ceedd8 100644 --- a/app/src/main/java/net/sourceforge/opencamera/ui/MainUI.java +++ b/app/src/main/java/net/sourceforge/opencamera/ui/MainUI.java @@ -40,7 +40,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; @@ -452,7 +451,7 @@ public class MainUI { 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); + layoutParams.setMargins(0, 30, navigation_gap, 30); view.setLayoutParams(layoutParams); setViewRotation(view, ui_rotation); @@ -503,13 +502,8 @@ public class MainUI { 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 + setViewRotation(view, ui_rotation); // view = main_activity.findViewById(R.id.zoom_seekbar); layoutParams = (RelativeLayout.LayoutParams) view.getLayoutParams(); @@ -661,9 +655,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; @@ -821,22 +812,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 { @@ -847,13 +836,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 } @@ -899,10 +887,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)); @@ -1070,6 +1058,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()) @@ -1108,6 +1097,7 @@ public class MainUI { } if (main_activity.getPreview().supportsZoom() && sharedPreferences.getBoolean(PreferenceKeys.ShowZoomSliderControlsPreferenceKey, true)) { 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")) { @@ -1237,14 +1227,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)); } @@ -1256,7 +1247,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); @@ -1266,27 +1257,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)); } @@ -1299,38 +1294,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)); } @@ -1350,13 +1346,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)); } @@ -1764,8 +1762,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); @@ -1924,8 +1922,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); } @@ -2021,7 +2017,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); @@ -2046,15 +2042,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 e0fb50403..2884ae695 100644 --- a/app/src/main/java/net/sourceforge/opencamera/ui/PopupView.java +++ b/app/src/main/java/net/sourceforge/opencamera/ui/PopupView.java @@ -34,6 +34,7 @@ import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.HorizontalScrollView; import android.widget.ImageButton; +import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RadioButton; import android.widget.RadioGroup; @@ -330,7 +331,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 +1053,8 @@ public class PopupView extends LinearLayout { } } + + setBackgroundColor(Color.parseColor("#E5000000")); } int getTotalWidth() { @@ -1473,8 +1476,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(Color.parseColor("#61FFFFFF")); // Grey 900 this.addView(text_view); } @@ -1516,12 +1520,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 +1574,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 +1747,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 +1764,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 +1785,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 GIT binary patch literal 0 HcmV?d00001 literal 1060 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGojKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85o2LL74ILovJHjG_8%uNL{IL zF)Z+)mt%cHs(^^#!9!73{FFJ4WlV{<*%85E79}C-vLVnV@XwJ$eiyV1l~m?!Htv)* zy7}hb-Lo^xE%|NE%sqMTz`2_{jlZ9pJ@4ktn_U+#&erecU{^TC*ip!kB-0=PXF6Cd zS9IU_g~xo!1BN3O42FCOhN~Y|-8ff#IC*Vz?bWSPG6$T(4hDbFyK|Daw1VsWvrV!6 ze?Rcqgv73H-Mp~u-sb|Ya|hlRu|HS0~ zVwc@PTsgZw# z?Sb=-)w{OY?9qJJeEI5DAz{^q!U~IQGoIZmlOv5K`^s(~+*z};gM)Fy`TCirvzy|3 ze(zhiZt2B!lMm0XQWVTP4nlPQGju*^ys= z&F4^Tz;RHDeyj`pKvAD-5&6 zgcTX=jxV2cV)X~#Yd&qkXQwB6aoGI4v;E&|FFRJ&3B}g_35$IWm~MCxadwwjT*Fx- zo}Kv@4WH}Yi3pNpQom*KaGS`V+oCttO^(-gp3!pp;CD`&pRUIvQXU?gbo%Dez#npc z&-XPe7ijC;S}yzPdJVT8yZz=j`t|2J9y8n%?mK*TLbJ{;)_DzUzy19BpnH~oaE( zS<3xLfB(hF{t=TaHM6HlUuW&?EMVQC=h5@J>4?VbCaXU8LrF?34|XXS#>R?^Jd``| zvNgQmtKj*$e`gJsmTBO;CX3~V zcg}si;huh5y>zRhpIv7W>y<-wbCqNGHklPNKe)`7zvIm+ulsMW2pKl4JH%{g$mh_* zEbthTY(Y$6Lk6Iu3SuV+0I5PaB?06;OkVc7$tS%-paJMusGE1_tzdyLy;^{hzdtzm kpqhtdGzxP`h}M6G`S%V?on+*a4$RpMp00i_>zopr0N}yXbpQYW 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 000000000..a89f1dc37 --- /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/ic_album.xml b/app/src/main/res/drawable/ic_album.xml new file mode 100644 index 000000000..0d405e1b1 --- /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 000000000..96e51169c --- /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 000000000..b6a971563 --- /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 000000000..0c95084ab --- /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 000000000..85527b80d --- /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 000000000..a8c73ded0 --- /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 000000000..f8f0feada --- /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 000000000..847fac1ee --- /dev/null +++ b/app/src/main/res/drawable/ic_camera_exposure_unlocked.xml @@ -0,0 +1,12 @@ + + + + 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 000000000..05695cc5f --- /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 000000000..4f9de8fe8 --- /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 000000000..f730d3487 --- /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 000000000..9a40bbed8 --- /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 000000000..b2f4b848b --- /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 000000000..9abbe1d59 --- /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 000000000..56a26f6f0 --- /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 000000000..25ba545e7 --- /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 000000000..6742eb620 --- /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 000000000..9421788a2 --- /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 000000000..62843bbfa --- /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 000000000..e2425de88 --- /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 000000000..3b41c7d3b --- /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 000000000..237304b83 --- /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 000000000..d1e5e09b3 --- /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 000000000..2aa6de863 --- /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 000000000..2de1215b8 --- /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 000000000..83d8320cb --- /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 000000000..91a357038 --- /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 000000000..4f1fe082e --- /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 000000000..97dc40fe7 --- /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 936e4ea22..7e719d8e0 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 000000000..c1997c450 --- /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 000000000..71b5fe40d --- /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 000000000..58b60758f --- /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 000000000..dff67e47f --- /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 000000000..394f1a119 --- /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 000000000..847fac1ee --- /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 000000000..fa07ae306 --- /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 000000000..7b88044b2 --- /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 000000000..290197c05 --- /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 000000000..a9e537021 --- /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 000000000..a3e877e76 --- /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 000000000..c1046645e --- /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 000000000..b3663c74d --- /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 000000000..4b6796e49 --- /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 000000000..fae1ec549 --- /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 000000000..5d40ece83 --- /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 000000000..2c4b973fb --- /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 000000000..af29186f0 --- /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 000000000..560333a54 --- /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 000000000..f8ad413e1 --- /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 000000000..162807993 --- /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 000000000..d71a2d7da --- /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 000000000..30a1ec5ae --- /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 000000000..761ecc0fb --- /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 000000000..7020a3f07 --- /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 000000000..5ff6fec08 --- /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 000000000..fcb75da98 --- /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 000000000..074469888 --- /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 000000000..3c2171f74 --- /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 000000000..8d17d9266 --- /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 000000000..07b801e2c --- /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 000000000..c8116a086 --- /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 000000000..6f2d66a44 --- /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 000000000..bb0f2e301 --- /dev/null +++ b/app/src/main/res/drawable/ic_zoom_in.xml @@ -0,0 +1,11 @@ + + + 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 000000000..7e0d21875 --- /dev/null +++ b/app/src/main/res/drawable/popup_camera_flash_auto.xml @@ -0,0 +1,12 @@ + + + + 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 000000000..3b29af77b --- /dev/null +++ b/app/src/main/res/drawable/popup_camera_flash_off.xml @@ -0,0 +1,12 @@ + + + + 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 000000000..8336122a1 --- /dev/null +++ b/app/src/main/res/drawable/popup_camera_flash_on.xml @@ -0,0 +1,12 @@ + + + + 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 000000000..f56e7c9a2 --- /dev/null +++ b/app/src/main/res/drawable/popup_camera_flash_red_eye.xml @@ -0,0 +1,12 @@ + + + + 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 000000000..3753cd5d5 --- /dev/null +++ b/app/src/main/res/drawable/popup_camera_flash_torch.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/app/src/main/res/drawable/shortcut_gallery.xml b/app/src/main/res/drawable/shortcut_gallery.xml index 08c97fc63..c2a944fda 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 61087dd69..efb3e4cdf 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 439f19a6b..507715e75 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 abc44e2aa..c9a5de996 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 ce47d408f..493fda425 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 5777bb2e0..c269c2282 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 2b58aab91..8e740588f 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 5777bb2e0..c269c2282 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 45f6dd853..e673315e4 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:src="@drawable/ic_camera_shutter" /> + android:src="@drawable/ic_camera_toggle" /> @@ -64,7 +79,7 @@ android:background="@null" android:contentDescription="@string/pause_video" android:onClick="clickedPauseVideo" - android:padding="8dp" + android:padding="12dp" android:scaleType="fitCenter" android:src="@drawable/ic_pause" android:visibility="gone" /> @@ -79,7 +94,7 @@ android:onClick="clickedCancelPanorama" android:padding="12dp" android:scaleType="fitCenter" - android:src="@drawable/baseline_close_white_48" + android:src="@drawable/ic_cancel" android:visibility="gone" /> @@ -93,8 +108,7 @@ android:onClick="clickedSwitchVideo" android:padding="12dp" android:scaleType="fitCenter" - android:src="@lineageos.platform:drawable/ic_camera_video" - android:tint="@color/color_default_foreground" /> + android:src="@drawable/ic_switch_video" /> + android:gravity="center|end" + android:orientation="horizontal"> + + + @@ -178,15 +206,15 @@ />--> - + android:src="@drawable/ic_album" + app:civ_border_color="#40FFFFFF" + app:civ_border_width="0dp" /> + android:src="@drawable/ic_settings" /> + android:src="@drawable/ic_more" /> @@ -400,7 +424,7 @@ android:onClick="clickedTrash" android:padding="12dp" android:scaleType="fitCenter" - android:src="@lineageos.platform:drawable/ic_bin" + android:src="@drawable/ic_delete" android:visibility="gone" /> @@ -437,7 +464,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 +480,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" /> + + + + + + + + + + + +