OPC(Olympus Air)用撮影アプリ。
Révision | fbd31a37a59b70f0b23cb46f9e93cbf38203ced3 (tree) |
---|---|
l'heure | 2017-04-26 00:25:16 |
Auteur | MRSa <mrsa@myad...> |
Commiter | MRSa |
起動時にグリッド線のON/OFFアイコンを更新。
その他微修正。
@@ -1,5 +1,6 @@ | ||
1 | 1 | package jp.sfjp.gokigen.a01c; |
2 | 2 | |
3 | +import android.content.SharedPreferences; | |
3 | 4 | import android.graphics.Color; |
4 | 5 | import android.os.Bundle; |
5 | 6 | import android.os.Vibrator; |
@@ -90,6 +91,7 @@ public class MainActivity extends WearableActivity implements IChangeScene, ISh | ||
90 | 91 | vibrator = (Vibrator) getSystemService(VIBRATOR_SERVICE); |
91 | 92 | |
92 | 93 | setupCameraCoordinator(); |
94 | + setupInitialButtonIcons(); | |
93 | 95 | setupActionListener(); |
94 | 96 | } |
95 | 97 |
@@ -227,6 +229,31 @@ public class MainActivity extends WearableActivity implements IChangeScene, ISh | ||
227 | 229 | } |
228 | 230 | |
229 | 231 | /** |
232 | + * ボタンアイコンの初期設定 | |
233 | + * | |
234 | + */ | |
235 | + private void setupInitialButtonIcons() | |
236 | + { | |
237 | + if (coordinator != null) | |
238 | + { | |
239 | + int resId; | |
240 | + SharedPreferences preferences = android.support.v7.preference.PreferenceManager.getDefaultSharedPreferences(this); | |
241 | + if (preferences.getBoolean(ICameraPropertyAccessor.SHOW_GRID_STATUS, true)) | |
242 | + { | |
243 | + // ボタンをGrid OFFアイコンにする | |
244 | + resId = R.drawable.btn_ic_grid_off; | |
245 | + } | |
246 | + else | |
247 | + { | |
248 | + // ボタンをGrid ONアイコンにする | |
249 | + resId = R.drawable.btn_ic_grid_on; | |
250 | + } | |
251 | + setButtonDrawable(IShowInformation.BUTTON_1, resId); | |
252 | + } | |
253 | + } | |
254 | + | |
255 | + | |
256 | + /** | |
230 | 257 | * Olympus Cameraクラスとのやりとりをするクラスを準備する |
231 | 258 | * (カメラとの接続も、ここでスレッドを起こして開始する) |
232 | 259 | */ |
@@ -578,7 +578,7 @@ public class CameraLiveImageView extends View implements CameraLiveViewListenerI | ||
578 | 578 | int centerX = width / 2; |
579 | 579 | int centerY = height / 2; |
580 | 580 | |
581 | - float maxBandWidth = width / 3.0f; // ゲージの最大長 (画面の 1/3 ぐらい) | |
581 | + //float maxBandWidth = width / 3.0f; // ゲージの最大長 (画面の 1/3 ぐらい) | |
582 | 582 | float maxBandHeight = height / 3.0f; // ゲージの最大長 (画面の 1/3 ぐらい) |
583 | 583 | int barWidthInitial = 4; // 表示するゲージの幅(の初期値) |
584 | 584 | int barWidth; // 実際に表示するゲージの幅 |
@@ -30,6 +30,6 @@ class GridFrameDrawer0 implements IGridFrameDrawer | ||
30 | 30 | @Override |
31 | 31 | public int getDrawColor() |
32 | 32 | { |
33 | - return (Color.argb(210,245,245,245)); | |
33 | + return (Color.argb(230,245,245,245)); | |
34 | 34 | } |
35 | 35 | } |
@@ -207,7 +207,7 @@ public class FeatureDispatcher implements ICameraFeatureDispatcher | ||
207 | 207 | /* |
208 | 208 | try |
209 | 209 | { |
210 | - // 実験... WIFIステート | |
210 | + // 実験... WIFIステート設定画面を開く | |
211 | 211 | //Intent intent = new Intent(ACTION_ADD_NETWORK_SETTINGS); |
212 | 212 | Intent intent = new Intent(ACTION_NETWORK_SETTINGS); |
213 | 213 | context.startActivity(intent); |