OSDN Git Service

・上部エリアのサイズ(高さ)を2dp拡大。
authorMRSa <mrsa@myad.jp>
Mon, 24 Apr 2017 15:40:46 +0000 (00:40 +0900)
committerMRSa <mrsa@myad.jp>
Mon, 24 Apr 2017 15:40:46 +0000 (00:40 +0900)
・レイアウトのパディングを2dpから1dpに減らす。(square時)
・ボタン4, ボタン5の長押しはやめる。(エリア3の長押しに一本化)
・動画撮影モードのシャッターボタンアイコンをムービーアイコンに切り替える。

wear/src/main/java/jp/sfjp/gokigen/a01c/liveview/button/PushedButton4.java
wear/src/main/java/jp/sfjp/gokigen/a01c/liveview/button/PushedButton5.java
wear/src/main/java/jp/sfjp/gokigen/a01c/olycamerawrapper/indicator/CameraStatusDisplay.java
wear/src/main/res/layout-notround/activity_main.xml
wear/src/main/res/layout-round/activity_main.xml

index 67ee274..b66ada7 100644 (file)
@@ -32,27 +32,27 @@ class PushedButton4 implements IPushedButton
         {
             case "P":
                 preference_action_id = preference_action_id + ICameraFeatureDispatcher.MODE_P;
-                defaultAction =  (isLongClick) ? ICameraFeatureDispatcher.FEATURE_AE_DOWN : ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_DOWN;
+                defaultAction =  (isLongClick) ? ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_DOWN : ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_DOWN;
                 break;
 
             case "A":
                 preference_action_id = preference_action_id + ICameraFeatureDispatcher.MODE_A;
-                defaultAction =  (isLongClick) ? ICameraFeatureDispatcher.FEATURE_AE_DOWN : ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_DOWN;
+                defaultAction =  (isLongClick) ? ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_DOWN : ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_DOWN;
                 break;
 
             case "S":
                 preference_action_id = preference_action_id + ICameraFeatureDispatcher.MODE_S;
-                defaultAction =  (isLongClick) ? ICameraFeatureDispatcher.FEATURE_AE_DOWN : ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_DOWN;
+                defaultAction =  (isLongClick) ? ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_DOWN : ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_DOWN;
                 break;
 
             case "M":
                 preference_action_id = preference_action_id + ICameraFeatureDispatcher.MODE_M;
-                defaultAction =  (isLongClick) ? ICameraFeatureDispatcher.FEATURE_AE_DOWN : ICameraFeatureDispatcher.FEATURE_APERTURE_DOWN;
+                defaultAction =  (isLongClick) ? ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_DOWN : ICameraFeatureDispatcher.FEATURE_APERTURE_DOWN;
                 break;
 
             case "ART":
                 preference_action_id = preference_action_id + ICameraFeatureDispatcher.MODE_ART;
-                defaultAction =  (isLongClick) ? ICameraFeatureDispatcher.FEATURE_AE_DOWN : ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_DOWN;
+                defaultAction =  (isLongClick) ? ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_DOWN : ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_DOWN;
                 break;
 
             case "iAuto":
index ac80a9d..6a228f6 100644 (file)
@@ -32,27 +32,27 @@ class PushedButton5 implements IPushedButton
         {
             case "P":
                 preference_action_id = preference_action_id + ICameraFeatureDispatcher.MODE_P;
-                defaultAction =  (isLongClick) ? ICameraFeatureDispatcher.FEATURE_AE_UP : ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_UP;
+                defaultAction =  (isLongClick) ? ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_UP : ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_UP;
                 break;
 
             case "A":
                 preference_action_id = preference_action_id + ICameraFeatureDispatcher.MODE_A;
-                defaultAction =  (isLongClick) ? ICameraFeatureDispatcher.FEATURE_AE_UP : ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_UP;
+                defaultAction =  (isLongClick) ? ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_UP : ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_UP;
                 break;
 
             case "S":
                 preference_action_id = preference_action_id + ICameraFeatureDispatcher.MODE_S;
-                defaultAction =  (isLongClick) ? ICameraFeatureDispatcher.FEATURE_AE_UP : ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_UP;
+                defaultAction =  (isLongClick) ? ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_UP : ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_UP;
                 break;
 
             case "M":
                 preference_action_id = preference_action_id + ICameraFeatureDispatcher.MODE_M;
-                defaultAction = (isLongClick) ? ICameraFeatureDispatcher.FEATURE_AE_UP : ICameraFeatureDispatcher.FEATURE_APERTURE_UP;
+                defaultAction = (isLongClick) ? ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_UP : ICameraFeatureDispatcher.FEATURE_APERTURE_UP;
                 break;
 
             case "ART":
                 preference_action_id = preference_action_id + ICameraFeatureDispatcher.MODE_ART;
-                defaultAction =  (isLongClick) ? ICameraFeatureDispatcher.FEATURE_AE_UP : ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_UP;
+                defaultAction =  (isLongClick) ? ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_UP : ICameraFeatureDispatcher.FEATURE_EXPOSURE_BIAS_UP;
                 break;
 
             case "iAuto":
index 3775110..be4fe24 100644 (file)
@@ -4,6 +4,7 @@ import android.graphics.Color;
 import android.util.Log;
 
 import jp.sfjp.gokigen.a01c.IShowInformation;
+import jp.sfjp.gokigen.a01c.R;
 import jp.sfjp.gokigen.a01c.olycamerawrapper.property.IOlyCameraProperty;
 import jp.sfjp.gokigen.a01c.olycamerawrapper.property.IOlyCameraPropertyProvider;
 
@@ -18,6 +19,7 @@ public class CameraStatusDisplay implements  ICameraStatusDisplay
     private final IShowInformation informationObject;
 
     // 表示エリア定義用...  : 将来的には preferenceにおいてカスタマイズ可能にするつもり
+    private int shutterButtonId = R.id.btn_6;                          // シャッターボタンのボタンID
     private int takeModeArea = IShowInformation.AREA_1;                // 撮影モードの表示エリア指定
     private int shutterSpeedArea = IShowInformation.AREA_2;           // シャッタースピードの表示エリア指定
     private int apertureArea = IShowInformation.AREA_3;                // 絞り値の表示エリア指定
@@ -60,12 +62,14 @@ public class CameraStatusDisplay implements  ICameraStatusDisplay
     @Override
     public void updateTakeMode()
     {
+        Log.v(TAG, "updateTakeMode()");
+        String propertyValue = propertyProxy.getCameraPropertyValueTitle(propertyProxy.getCameraPropertyValue(IOlyCameraProperty.TAKE_MODE));
+
+        updateButtonIcon(propertyValue);   // ボタンアイコンの更新
         if (takeModeArea == IShowInformation.AREA_NONE)
         {
             return;
         }
-        Log.v(TAG, "updateTakeMode()");
-        String propertyValue = propertyProxy.getCameraPropertyValueTitle(propertyProxy.getCameraPropertyValue(IOlyCameraProperty.TAKE_MODE));
         if (propertyValue != null)
         {
             informationObject.setMessage(takeModeArea, Color.WHITE, propertyValue);
@@ -457,6 +461,27 @@ public class CameraStatusDisplay implements  ICameraStatusDisplay
     }
 
     /**
+     *   ボタンのアイコンを更新する
+     *
+     */
+    private void updateButtonIcon(String takeMode)
+    {
+        int btnResId;
+        if (takeMode.equals("Movie"))
+        {
+            btnResId = R.drawable.btn_videocam;
+        }
+        else
+        {
+            btnResId = R.drawable.btn_ic_camera_alt;
+        }
+        if (shutterButtonId != 0)
+        {
+            informationObject.setButtonDrawable(shutterButtonId, btnResId);
+        }
+    }
+
+    /**
      *   撮影モードに合わせて、表示内容を変化させる...
      *
      */
index 9d58a86..b2da0df 100644 (file)
@@ -10,7 +10,7 @@
     <FrameLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:padding="2dp"
+        android:padding="1dp"
         app:layout_box="all">
 
         <jp.sfjp.gokigen.a01c.liveview.CameraLiveImageView
@@ -30,7 +30,7 @@
             <TextView
                 android:id="@+id/text_1"
                 android:layout_width="match_parent"
-                android:layout_height="16dp"
+                android:layout_height="18dp"
                 android:layout_weight="1"
                 android:text="@string/app_name"
                 android:textColor="@android:color/white"
@@ -40,7 +40,7 @@
             <TextView
                 android:id="@+id/text_2"
                 android:layout_width="match_parent"
-                android:layout_height="14dp"
+                android:layout_height="18dp"
                 android:layout_weight="1"
                 android:text="@string/text_message_blank"
                 android:textColor="@android:color/white"
@@ -50,7 +50,7 @@
             <TextView
                 android:id="@+id/text_3"
                 android:layout_width="match_parent"
-                android:layout_height="14dp"
+                android:layout_height="18dp"
                 android:layout_weight="1"
                 android:text="@string/text_message_blank"
                 android:textColor="@android:color/white"
@@ -60,7 +60,7 @@
             <TextView
                 android:id="@+id/text_4"
                 android:layout_width="match_parent"
-                android:layout_height="14dp"
+                android:layout_height="18dp"
                 android:layout_weight="1"
                 android:text="@string/text_message_blank"
                 android:textColor="@android:color/holo_orange_light"
index 189f35f..d107eee 100644 (file)
@@ -30,7 +30,7 @@
             <TextView
                 android:id="@+id/text_1"
                 android:layout_width="match_parent"
-                android:layout_height="16dp"
+                android:layout_height="18dp"
                 android:layout_weight="1"
                 android:text="@string/app_name"
                 android:textColor="@android:color/white"
@@ -40,7 +40,7 @@
             <TextView
                 android:id="@+id/text_2"
                 android:layout_width="match_parent"
-                android:layout_height="16dp"
+                android:layout_height="18dp"
                 android:layout_weight="1"
                 android:text="@string/text_message_blank"
                 android:textColor="@android:color/white"
@@ -50,7 +50,7 @@
             <TextView
                 android:id="@+id/text_3"
                 android:layout_width="match_parent"
-                android:layout_height="16dp"
+                android:layout_height="18dp"
                 android:layout_weight="1"
                 android:text="@string/text_message_blank"
                 android:textColor="@android:color/white"
@@ -60,7 +60,7 @@
             <TextView
                 android:id="@+id/text_4"
                 android:layout_width="match_parent"
-                android:layout_height="16dp"
+                android:layout_height="18dp"
                 android:layout_weight="1"
                 android:text="@string/text_message_blank"
                 android:textColor="@android:color/holo_orange_light"