import android.Manifest;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
-import android.graphics.Color;
-import android.graphics.Typeface;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.WindowManager;
-import android.widget.TextView;
import net.osdn.gokigen.a01d.camera.CameraInterfaceProvider;
import net.osdn.gokigen.a01d.camera.IInterfaceProvider;
import net.osdn.gokigen.a01d.camera.ICameraStatusReceiver;
import net.osdn.gokigen.a01d.camera.ICameraConnection;
import net.osdn.gokigen.a01d.camera.olympus.wrapper.connection.ble.ICameraPowerOn;
+import net.osdn.gokigen.a01d.camera.ptpip.operation.PtpIpCameraCommandSendDialog;
import net.osdn.gokigen.a01d.camera.utils.SimpleHttpSendCommandDialog;
import net.osdn.gokigen.a01d.camera.panasonic.operation.PanasonicSendCommandDialog;
import net.osdn.gokigen.a01d.camera.ricohgr2.operation.RicohGr2SendCommandDialog;
import net.osdn.gokigen.a01d.liveview.LiveViewFragment;
import net.osdn.gokigen.a01d.logcat.LogCatFragment;
import net.osdn.gokigen.a01d.preference.IPreferencePropertyAccessor;
+import net.osdn.gokigen.a01d.preference.canon.CanonPreferenceFragment;
import net.osdn.gokigen.a01d.preference.fujix.FujiXPreferenceFragment;
import net.osdn.gokigen.a01d.preference.olympus.PreferenceFragment;
import net.osdn.gokigen.a01d.preference.panasonic.PanasonicPreferenceFragment;
{
try
{
- interfaceProvider = new CameraInterfaceProvider(this, this);
+ interfaceProvider = new CameraInterfaceProvider(this, this, this);
}
catch (Exception e)
{
e.printStackTrace();
}
}
+ else if (method == ICameraConnection.CameraConnectionMethod.CANON)
+ {
+ try
+ {
+ // CANON の場合は、PTPIPコマンド送信ダイアログを表示する
+ PtpIpCameraCommandSendDialog.newInstance(interfaceProvider.getCanonInterface(), true).show(getSupportFragmentManager(), "ptpipSendCommandDialog");
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
else
{
// OPC カメラの場合...
preferenceFragment = FujiXPreferenceFragment.newInstance(this, this);
} else if (connectionMethod == ICameraConnection.CameraConnectionMethod.THETA) {
preferenceFragment = ThetaPreferenceFragment.newInstance(this, this);
+ } else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON) {
+ preferenceFragment = CanonPreferenceFragment.newInstance(this, this);
} else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
{
preferenceFragment = PreferenceFragment.newInstance(this, interfaceProvider, this);
{
connection = interfaceProvider.getThetaInterface().getCameraConnection();
}
+ else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
+ {
+ connection = interfaceProvider.getCanonInterface().getCameraConnection();
+ }
else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
{
connection = interfaceProvider.getOlympusInterface().getOlyCameraConnection();
import android.app.Activity;
import android.content.SharedPreferences;
+import net.osdn.gokigen.a01d.IInformationReceiver;
+import net.osdn.gokigen.a01d.camera.canon.wrapper.CanonInterfaceProvider;
import net.osdn.gokigen.a01d.camera.fujix.IFujiXInterfaceProvider;
import net.osdn.gokigen.a01d.camera.fujix.wrapper.FujiXInterfaceProvider;
+import net.osdn.gokigen.a01d.camera.nikon.wrapper.NikonInterfaceProvider;
import net.osdn.gokigen.a01d.camera.olympus.wrapper.IOlympusLiveViewListener;
import net.osdn.gokigen.a01d.camera.olympus.IOlympusInterfaceProvider;
import net.osdn.gokigen.a01d.camera.olympus.wrapper.OlympusInterfaceProvider;
import net.osdn.gokigen.a01d.camera.olympuspen.wrapper.OlympusPenInterfaceProvider;
import net.osdn.gokigen.a01d.camera.panasonic.IPanasonicInterfaceProvider;
import net.osdn.gokigen.a01d.camera.panasonic.wrapper.PanasonicCameraWrapper;
+import net.osdn.gokigen.a01d.camera.ptpip.IPtpIpInterfaceProvider;
import net.osdn.gokigen.a01d.camera.ricohgr2.IRicohGr2InterfaceProvider;
import net.osdn.gokigen.a01d.camera.ricohgr2.wrapper.RicohGr2InterfaceProvider;
import net.osdn.gokigen.a01d.camera.sony.ISonyInterfaceProvider;
private final FujiXInterfaceProvider fujiX;
private final PanasonicCameraWrapper panasonic;
private final ThetaInterfaceProvider theta;
+ private final CanonInterfaceProvider canon;
+ private final NikonInterfaceProvider nikon;
private final CameraStatusListener statusListener;
- public CameraInterfaceProvider(@NonNull Activity context, @NonNull ICameraStatusReceiver provider)
+ public CameraInterfaceProvider(@NonNull Activity context, @NonNull ICameraStatusReceiver provider, @NonNull IInformationReceiver informationReceiver)
{
this.context = context;
this.statusListener = new CameraStatusListener();
panasonic = new PanasonicCameraWrapper(context, provider, statusListener);
ricohGr2 = new RicohGr2InterfaceProvider(context, provider);
theta = new ThetaInterfaceProvider(context, provider, statusListener);
+ canon = new CanonInterfaceProvider(context, provider, statusListener, informationReceiver);
+ nikon = new NikonInterfaceProvider(context, provider, statusListener, informationReceiver);
}
@Override
}
@Override
+ public IPtpIpInterfaceProvider getCanonInterface()
+ {
+ return (canon);
+ }
+
+ @Override
+ public IPtpIpInterfaceProvider getNikonInterface()
+ {
+ return (nikon);
+ }
+
+ @Override
public IOlympusPenInterfaceProvider getOlympusPenInterface()
{
return (olympusPen);
{
ret = ICameraConnection.CameraConnectionMethod.THETA;
}
+ else if (connectionMethod.contains("CANON"))
+ {
+ ret = ICameraConnection.CameraConnectionMethod.CANON;
+ }
}
catch (Exception e)
{
PANASONIC,
OLYMPUS,
THETA,
+ CANON,
}
enum CameraConnectionStatus
import net.osdn.gokigen.a01d.camera.olympus.IOlympusInterfaceProvider;
import net.osdn.gokigen.a01d.camera.olympuspen.IOlympusPenInterfaceProvider;
import net.osdn.gokigen.a01d.camera.panasonic.IPanasonicInterfaceProvider;
+import net.osdn.gokigen.a01d.camera.ptpip.IPtpIpInterfaceProvider;
import net.osdn.gokigen.a01d.camera.ricohgr2.IRicohGr2InterfaceProvider;
import net.osdn.gokigen.a01d.camera.sony.ISonyInterfaceProvider;
import net.osdn.gokigen.a01d.camera.theta.IThetaInterfaceProvider;
IRicohGr2InterfaceProvider getRicohGr2Infterface();
IFujiXInterfaceProvider getFujiXInterface();
IPanasonicInterfaceProvider getPanasonicInterface();
+ IPtpIpInterfaceProvider getCanonInterface();
+ IPtpIpInterfaceProvider getNikonInterface();
IOlympusPenInterfaceProvider getOlympusPenInterface();
--- /dev/null
+package net.osdn.gokigen.a01d.camera.ptpip.operation;
+
+
+import android.app.Activity;
+import android.util.Log;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+
+import net.osdn.gokigen.a01d.camera.ptpip.wrapper.command.IPtpIpCommandCallback;
+
+class PtpIpCameraCommandResponse implements IPtpIpCommandCallback
+{
+ private final String TAG = toString();
+ private final Activity activity;
+ private final TextView field;
+
+ PtpIpCameraCommandResponse(@NonNull Activity activity, @NonNull TextView field)
+ {
+ this.activity = activity;
+ this.field = field;
+ }
+
+ void clear()
+ {
+ try
+ {
+ activity.runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ field.setText("");
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ public void onReceiveProgress(int currentBytes, int totalBytes, byte[] body)
+ {
+ Log.v(TAG, " " + currentBytes + "/" + totalBytes);
+ }
+
+ @Override
+ public boolean isReceiveMulti()
+ {
+ return (false);
+ }
+
+ @Override
+ public void receivedMessage(int id, byte[] rx_body)
+ {
+ //Log.v(TAG, "RECEIVE : " + rx_body.length + " bytes.");
+ String message = "[Receive "+ rx_body.length + " bytes.]\n";
+ message = message + dump_bytes(rx_body);
+ final String messageToShow = message;
+ try
+ {
+ activity.runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ field.setText(messageToShow);
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * デバッグ用:ログにバイト列を出力する
+ *
+ */
+ private String dump_bytes(byte[] data)
+ {
+ int index = 0;
+ StringBuilder message = new StringBuilder();
+ for (byte item : data)
+ {
+ index++;
+ message.append(String.format("%02x ", item));
+ if (index >= 8)
+ {
+ message.append("\n");
+ index = 0;
+ }
+ }
+ message.append("\n");
+ return (message.toString());
+ }
+}
--- /dev/null
+package net.osdn.gokigen.a01d.camera.ptpip.operation;
+
+import android.app.Activity;
+import android.app.Dialog;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.Spinner;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.appcompat.app.AlertDialog;
+import androidx.collection.SparseArrayCompat;
+import androidx.fragment.app.DialogFragment;
+
+import net.osdn.gokigen.a01d.R;
+import net.osdn.gokigen.a01d.camera.ptpip.IPtpIpInterfaceProvider;
+import net.osdn.gokigen.a01d.camera.ptpip.wrapper.command.IPtpIpCommandPublisher;
+import net.osdn.gokigen.a01d.camera.ptpip.wrapper.command.messages.PtpIpCommandGeneric;
+
+
+public class PtpIpCameraCommandSendDialog extends DialogFragment
+{
+ private final String TAG = toString();
+ private Dialog myDialog = null;
+ private IPtpIpCommandPublisher commandPublisher = null;
+ private PtpIpCameraCommandResponse responseReceiver = null;
+ private SparseArrayCompat<String> commandNameIndexArray;
+ private boolean isDumpLog = false;
+
+ private int selectedCommandIdPosition = 0;
+ private int selectedBodyLengthPosition = 0;
+
+ public static PtpIpCameraCommandSendDialog newInstance(@NonNull IPtpIpInterfaceProvider interfaceProvider, boolean isDumpLog)
+ {
+ PtpIpCameraCommandSendDialog instance = new PtpIpCameraCommandSendDialog();
+ instance.prepare(interfaceProvider, isDumpLog);
+
+ // パラメータはBundleにまとめておく
+ Bundle arguments = new Bundle();
+ //arguments.putString("method", method);
+ //arguments.putString("message", message);
+ instance.setArguments(arguments);
+
+ return (instance);
+ }
+
+ private void prepare(@NonNull IPtpIpInterfaceProvider interfaceProvider, boolean isDumpLog)
+ {
+ this.commandPublisher = interfaceProvider.getCommandPublisher();
+ this.commandNameIndexArray = new SparseArrayCompat<>();
+ this.isDumpLog = isDumpLog;
+ }
+
+ @Override
+ public @NonNull Dialog onCreateDialog(Bundle savedInstanceState)
+ {
+ final Activity activity = getActivity();
+ final AlertDialog.Builder alertDialog = new AlertDialog.Builder(activity);
+
+ // Get the layout inflater
+ LayoutInflater inflater = activity.getLayoutInflater();
+ final View alertView = inflater.inflate(R.layout.ptpip_request_command_layout, null, false);
+ alertDialog.setView(alertView);
+
+ alertDialog.setIcon(R.drawable.ic_linked_camera_black_24dp);
+ alertDialog.setTitle(getString(R.string.dialog_ptpip_command_title_command));
+ try
+ {
+ final TextView commandResponse = alertView.findViewById(R.id.command_response_value);
+ final EditText edit_command_id = alertView.findViewById(R.id.edit_command_id);
+ final EditText edit_message_body1 = alertView.findViewById(R.id.edit_message_body1);
+ final EditText edit_message_body2 = alertView.findViewById(R.id.edit_message_body2);
+ final EditText edit_message_body3 = alertView.findViewById(R.id.edit_message_body3);
+ final EditText edit_message_body4 = alertView.findViewById(R.id.edit_message_body4);
+ final Spinner selection_command_id = alertView.findViewById(R.id.spinner_selection_command_id);
+ final Spinner selection_message_body_length = alertView.findViewById(R.id.spinner_selection_message_body_length);
+ final Button sendButton = alertView.findViewById(R.id.send_message_button);
+ final Button liveViewButton = alertView.findViewById(R.id.change_to_liveview);
+ final Button playbackButton = alertView.findViewById(R.id.change_to_playback);
+
+ responseReceiver = new PtpIpCameraCommandResponse(activity, commandResponse);
+
+ initializeCommandSelection(activity, selection_command_id, edit_command_id);
+ initializeBodyLengthSelection(activity, selection_message_body_length);
+
+ sendButton.setOnClickListener(new View.OnClickListener()
+ {
+ @Override
+ public void onClick(View v)
+ {
+ try
+ {
+ //Log.v(TAG, "SEND COMMAND");
+ if (responseReceiver != null)
+ {
+ responseReceiver.clear();
+ int id = parseInt(edit_command_id);
+ int value1 = parseInt(edit_message_body1);
+ int value2 = parseInt(edit_message_body2);
+ int value3 = parseInt(edit_message_body3);
+ int value4 = parseInt(edit_message_body4);
+
+ if (selectedBodyLengthPosition == 0)
+ {
+ commandPublisher.enqueueCommand(new PtpIpCommandGeneric(responseReceiver, id, isDumpLog, 0, id));
+ }
+ else if (selectedBodyLengthPosition == 1)
+ {
+ commandPublisher.enqueueCommand(new PtpIpCommandGeneric(responseReceiver, id, isDumpLog, 0, id, 2, value1));
+ }
+ else if (selectedBodyLengthPosition == 2)
+ {
+ commandPublisher.enqueueCommand(new PtpIpCommandGeneric(responseReceiver, id, isDumpLog, 0, id, 4, value1));
+ }
+ else if (selectedBodyLengthPosition == 3)
+ {
+ commandPublisher.enqueueCommand(new PtpIpCommandGeneric(responseReceiver, id, isDumpLog, 0, id, 8, value1, value2));
+ }
+ else if (selectedBodyLengthPosition == 4)
+ {
+ commandPublisher.enqueueCommand(new PtpIpCommandGeneric(responseReceiver, id, isDumpLog, 0, id, 12, value1, value2, value3));
+ }
+ else // if (selectedBodyLengthPosition == 5)
+ {
+ commandPublisher.enqueueCommand(new PtpIpCommandGeneric(responseReceiver, id, isDumpLog, 0, id, 16, value1, value2, value3, value4));
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+ });
+ if ((responseReceiver != null)&&(commandPublisher != null))
+ {
+ //liveViewButton.setOnClickListener(new FujiXCameraModeChangeToLiveView(commandPublisher, responseReceiver));
+ //playbackButton.setOnClickListener(new FujiXCameraModeChangeToPlayback(commandPublisher, responseReceiver));
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ alertDialog.setCancelable(true);
+
+ // ボタンを設定する(実行ボタン)
+ alertDialog.setPositiveButton(activity.getString(R.string.dialog_positive_execute),
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which)
+ {
+ //dialog.dismiss();
+ }
+ });
+
+ // ボタンを設定する (キャンセルボタン)
+ alertDialog.setNegativeButton(activity.getString(R.string.dialog_negative_cancel),
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ dialog.cancel();
+ }
+ });
+
+ // 確認ダイアログを応答する
+ myDialog = alertDialog.create();
+ return (myDialog);
+ }
+
+ @Override
+ public void onPause()
+ {
+ super.onPause();
+ Log.v(TAG, "AlertDialog::onPause()");
+ if (myDialog != null)
+ {
+ myDialog.cancel();
+ }
+ }
+
+ private int parseInt(EditText area)
+ {
+ try
+ {
+ String value = (area.getText().toString()).toLowerCase();
+ int index = value.indexOf("x");
+ if (index > 0)
+ {
+ value = value.substring(index + 1);
+ }
+ if (value.length() < 1)
+ {
+ // 未入力のときには0を返す
+ return (0);
+ }
+ //int convertValue = (int)Long.parseLong(value, 16);
+ //Log.v(TAG, String.format(Locale.US, "PARSED VALUE : 0x%08x (%d)", convertValue, convertValue));
+ //return (convertValue);
+ return ((int)Long.parseLong(value, 16));
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ Log.v(TAG, "[" + area.getText().toString() + "]");
+ }
+ return (-1);
+ }
+
+
+ private ArrayAdapter<String> prepareCommandAdapter(@NonNull final Activity activity)
+ {
+ int position = 0;
+ ArrayAdapter<String> adapter = new ArrayAdapter<>(activity, android.R.layout.simple_spinner_item);
+ commandNameIndexArray.clear();
+
+ // せっせとコマンドを入れていく...
+ adapter.add("(Direct Input)");
+ commandNameIndexArray.append(position++, "");
+
+ return (adapter);
+ }
+
+ private void initializeCommandSelection(@NonNull final Activity activity, final Spinner spinner, final EditText commandIdArea)
+ {
+ try
+ {
+ commandIdArea.setText("");
+ ArrayAdapter<String> adapter = prepareCommandAdapter(activity);
+ spinner.setAdapter(adapter);
+ spinner.setSelection(selectedCommandIdPosition);
+ spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener()
+ {
+ @Override
+ public void onItemSelected(AdapterView<?> parent, View view, int position, long id)
+ {
+ Log.v(TAG, "onItemSelected : " + position + " (" + id + ")");
+ try
+ {
+ selectedCommandIdPosition = position;
+ commandIdArea.setText(commandNameIndexArray.get(position, ""));
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ public void onNothingSelected(AdapterView<?> parent)
+ {
+ Log.v(TAG, "onNothingSelected");
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ private void initializeBodyLengthSelection(final Activity activity, final Spinner spinner)
+ {
+ try
+ {
+ ArrayAdapter<String> adapter = new ArrayAdapter<>(activity, android.R.layout.simple_spinner_item);
+ adapter.add("0");
+ adapter.add("2");
+ adapter.add("4");
+ adapter.add("8");
+ adapter.add("12");
+ adapter.add("16");
+
+ spinner.setAdapter(adapter);
+ spinner.setSelection(selectedBodyLengthPosition);
+ spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener()
+ {
+ @Override
+ public void onItemSelected(AdapterView<?> parent, View view, int position, long id)
+ {
+ Log.v(TAG, "onItemSelected : " + position + " (" + id + ")");
+ selectedBodyLengthPosition = position;
+ }
+
+ @Override
+ public void onNothingSelected(AdapterView<?> parent)
+ {
+ Log.v(TAG, "onNothingSelected");
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+}
this.cameraConnection = interfaceProvider.getThetaInterface().getCameraConnection();
this.zoomLensControl = interfaceProvider.getThetaInterface().getZoomLensControl();
}
+ else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
+ {
+ this.focusingControl = interfaceProvider.getCanonInterface().getFocusingControl();
+ this.captureControl = interfaceProvider.getCanonInterface().getCaptureControl();
+ this.propertyProvider = interfaceProvider.getOlympusInterface().getCameraPropertyProvider(); // 要変更
+ this.cameraInformation = interfaceProvider.getCanonInterface().getCameraInformation();
+ this.cameraConnection = interfaceProvider.getCanonInterface().getCameraConnection();
+ this.zoomLensControl = interfaceProvider.getCanonInterface().getZoomLensControl();
+ }
else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
{
this.focusingControl = interfaceProvider.getOlympusInterface().getFocusingControl();
propertyButton.setOnClickListener(onClickTouchListener);
}
}
+ else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
+ {
+ if (favoriteButton != null)
+ {
+ favoriteButton.setVisibility(View.VISIBLE);
+ favoriteButton.setOnClickListener(onClickTouchListener);
+ }
+ if (manualFocus != null)
+ {
+ manualFocus.setVisibility(View.INVISIBLE);
+ }
+ if (changeLiveViewScale != null)
+ {
+ changeLiveViewScale.setVisibility(View.INVISIBLE);
+ }
+ if (focusIndicator != null)
+ {
+ focusIndicator.setVisibility(View.INVISIBLE);
+ }
+ if (propertyButton != null)
+ {
+ propertyButton.setOnClickListener(onClickTouchListener);
+ }
+ }
}
if (manualFocus != null)
{
{
interfaceInjector = interfaceProvider.getThetaInterface().getDisplayInjector();
}
+ else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
+ {
+ interfaceInjector = interfaceProvider.getCanonInterface().getDisplayInjector();
+ }
else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
{
interfaceInjector = interfaceProvider.getOlympusInterface().getDisplayInjector();
this.zoomLensControl = interfaceProvider.getThetaInterface().getZoomLensControl();
this.cameraInformation = interfaceProvider.getThetaInterface().getCameraInformation();
}
+ else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
+ {
+ this.liveViewControl = interfaceProvider.getCanonInterface().getLiveViewControl();
+ this.zoomLensControl = interfaceProvider.getCanonInterface().getZoomLensControl();
+ this.cameraInformation = interfaceProvider.getCanonInterface().getCameraInformation();
+ }
else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
{
this.liveViewControl = interfaceProvider.getOlympusInterface().getLiveViewControl();
{
lvListener = interfaceProvider.getThetaInterface().getLiveViewListener();
}
+ else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
+ {
+ lvListener = interfaceProvider.getCanonInterface().getLiveViewListener();
+ }
else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
{
interfaceProvider.getOlympusLiveViewListener().setOlympusLiveViewListener(liveViewListener);
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <ScrollView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <LinearLayout
+ android:id="@+id/info_edit_data"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:padding="6dp"
+ >
+
+ <LinearLayout
+ android:id="@+id/mode_change_button_area"
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:padding="6dp"
+ android:visibility="gone"
+ >
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:tag="button"
+ android:id="@+id/change_to_liveview"
+ android:text="@string/dialog_button_liveview"
+ android:layout_gravity="center"
+ android:textSize="6pt" />
+
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:tag="button"
+ android:id="@+id/change_to_playback"
+ android:text="@string/dialog_button_playback"
+ android:layout_gravity="center"
+ android:textSize="6pt" />
+ </LinearLayout>
+
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="2dp"
+ android:background="@android:color/darker_gray"/>
+
+ <LinearLayout
+ android:id="@+id/command_select_area"
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:padding="6dp"
+ >
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/command_name"
+ android:text="@string/dialog_title_command"
+ android:layout_gravity="start">
+ </TextView>
+
+ <Spinner
+ android:id="@+id/spinner_selection_command_id"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/blank"
+ android:visibility="visible" />
+ </LinearLayout>
+
+ <EditText android:id="@+id/edit_command_id"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:autoLink="all"
+ android:linksClickable="true"
+ android:inputType="text"
+ android:hint="@string/dialog_command_id_hint"
+ />
+
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="8dp" />
+
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="1dp"
+ android:background="@android:color/darker_gray"/>
+<!--
+ <LinearLayout
+ android:id="@+id/message_type_area"
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:padding="6dp"
+ >
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/message_type_name"
+ android:text="@string/dialog_message_type_name"
+ android:layout_gravity="start">
+ </TextView>
+
+ <Spinner
+ android:id="@+id/spinner_selection_message_type"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/blank"
+ android:visibility="visible" />
+ </LinearLayout>
+-->
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="1dp"
+ android:background="@android:color/darker_gray"/>
+
+ <LinearLayout
+ android:id="@+id/body_length_area"
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:padding="6dp"
+ >
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/body_length_name"
+ android:text="@string/dialog_title_body_length"
+ android:layout_gravity="start">
+ </TextView>
+
+ <Spinner
+ android:id="@+id/spinner_selection_message_body_length"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/blank"
+ android:visibility="visible" />
+ </LinearLayout>
+
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="1dp"
+ android:background="@android:color/darker_gray"/>
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="6dp" />
+
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/message_body_name"
+ android:text="@string/dialog_title_message_body"
+ />
+
+ <EditText android:id="@+id/edit_message_body1"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:autoLink="all"
+ android:linksClickable="true"
+ android:inputType="text"
+ android:hint="@string/dialog_message_body1_hint"
+ />
+
+ <EditText android:id="@+id/edit_message_body2"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:autoLink="all"
+ android:linksClickable="true"
+ android:inputType="text"
+ android:hint="@string/dialog_message_body2_hint"
+ />
+
+ <EditText android:id="@+id/edit_message_body3"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:autoLink="all"
+ android:linksClickable="true"
+ android:inputType="text"
+ android:hint="@string/dialog_message_body3_hint"
+ />
+
+ <EditText android:id="@+id/edit_message_body4"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:autoLink="all"
+ android:linksClickable="true"
+ android:inputType="text"
+ android:hint="@string/dialog_message_body4_hint"
+ />
+
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:tag="button"
+ android:id="@+id/send_message_button"
+ android:text="@string/dialog_send_message"
+ android:layout_gravity="center"
+ android:textSize="6pt" />
+
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="2dp"
+ android:background="@android:color/darker_gray"/>
+
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/command_response_value"
+ android:text="@string/blank"
+ />
+
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="2dp"
+ android:background="@android:color/darker_gray"/>
+
+ </LinearLayout>
+ </ScrollView>
+</LinearLayout>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <ScrollView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <LinearLayout
+ android:id="@+id/info_edit_data"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:padding="6dp"
+ >
+
+ <LinearLayout
+ android:id="@+id/mode_change_button_area"
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:padding="6dp"
+ android:visibility="gone"
+ >
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:tag="button"
+ android:id="@+id/change_to_liveview"
+ android:text="@string/dialog_button_liveview"
+ android:layout_gravity="center"
+ android:textSize="6pt" />
+
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:tag="button"
+ android:id="@+id/change_to_playback"
+ android:text="@string/dialog_button_playback"
+ android:layout_gravity="center"
+ android:textSize="6pt" />
+ </LinearLayout>
+
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="2dp"
+ android:background="@android:color/darker_gray"/>
+
+ <LinearLayout
+ android:id="@+id/command_select_area"
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:padding="6dp"
+ >
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/command_name"
+ android:text="@string/dialog_title_command"
+ android:layout_gravity="start">
+ </TextView>
+
+ <Spinner
+ android:id="@+id/spinner_selection_command_id"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/blank"
+ android:visibility="visible" />
+ </LinearLayout>
+
+ <EditText android:id="@+id/edit_command_id"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:autoLink="all"
+ android:linksClickable="true"
+ android:inputType="text"
+ android:hint="@string/dialog_command_id_hint"
+ />
+
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="8dp" />
+
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="1dp"
+ android:background="@android:color/darker_gray"/>
+<!--
+ <LinearLayout
+ android:id="@+id/message_type_area"
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:padding="6dp"
+ >
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/message_type_name"
+ android:text="@string/dialog_message_type_name"
+ android:layout_gravity="start">
+ </TextView>
+
+ <Spinner
+ android:id="@+id/spinner_selection_message_type"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/blank"
+ android:visibility="visible" />
+ </LinearLayout>
+-->
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="1dp"
+ android:background="@android:color/darker_gray"/>
+
+ <LinearLayout
+ android:id="@+id/body_length_area"
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:padding="6dp"
+ >
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/body_length_name"
+ android:text="@string/dialog_title_body_length"
+ android:layout_gravity="start">
+ </TextView>
+
+ <Spinner
+ android:id="@+id/spinner_selection_message_body_length"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/blank"
+ android:visibility="visible" />
+ </LinearLayout>
+
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="1dp"
+ android:background="@android:color/darker_gray"/>
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="6dp" />
+
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/message_body_name"
+ android:text="@string/dialog_title_message_body"
+ />
+
+ <EditText android:id="@+id/edit_message_body1"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:autoLink="all"
+ android:linksClickable="true"
+ android:inputType="text"
+ android:hint="@string/dialog_message_body1_hint"
+ />
+
+ <EditText android:id="@+id/edit_message_body2"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:autoLink="all"
+ android:linksClickable="true"
+ android:inputType="text"
+ android:hint="@string/dialog_message_body2_hint"
+ />
+
+ <EditText android:id="@+id/edit_message_body3"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:autoLink="all"
+ android:linksClickable="true"
+ android:inputType="text"
+ android:hint="@string/dialog_message_body3_hint"
+ />
+
+ <EditText android:id="@+id/edit_message_body4"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:autoLink="all"
+ android:linksClickable="true"
+ android:inputType="text"
+ android:hint="@string/dialog_message_body4_hint"
+ />
+
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:tag="button"
+ android:id="@+id/send_message_button"
+ android:text="@string/dialog_send_message"
+ android:layout_gravity="center"
+ android:textSize="6pt" />
+
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="2dp"
+ android:background="@android:color/darker_gray"/>
+
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/command_response_value"
+ android:text="@string/blank"
+ />
+
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="2dp"
+ android:background="@android:color/darker_gray"/>
+
+ </LinearLayout>
+ </ScrollView>
+</LinearLayout>
<item >Ricoh THETA Series</item>
<item >Fuji X Series</item>
<item >Panasonic</item>
+ <item >Canon</item>
</string-array>
<string-array name="connection_method_value">
<item >THETA</item>
<item >FUJI_X</item>
<item >PANASONIC</item>
+ <item >CANON</item>
</string-array>
<string name="dialog_ricoh_command_title_command">メッセージ送信(RICOH)</string>
<string name="dialog_panasonic_command_title_command">メッセージ送信(Panasonic)</string>
<string name="dialog_fujix_command_title_command">メッセージ送信(FUJI)</string>
+ <string name="dialog_ptpip_command_title_command">メッセージ送信(PTP/IP)</string>
<string name="dialog_title_command">コマンド</string>
<string name="dialog_command_id_hint">0x####</string>
<string name="dialog_message_type_name">メッセージ種別</string>
<string name="dialog_title_body_length">ボディ長</string>
<string name="dialog_message_body1_hint">0x########</string>
<string name="dialog_message_body2_hint">0x########</string>
+ <string name="dialog_message_body3_hint">0x########</string>
+ <string name="dialog_message_body4_hint">0x########</string>
<string name="dialog_title_message_body">メッセージボディ</string>
<string name="dialog_send_message">送信</string>
<string name="dialog_button_liveview">ライブビュー</string>
<item >Ricoh THETA Series</item>
<item >Fuji X Series</item>
<item >Panasonic</item>
+ <item >Canon</item>
</string-array>
<string-array name="connection_method_value">
<item >THETA</item>
<item >FUJI_X</item>
<item >PANASONIC</item>
+ <item >CANON</item>
</string-array>
<string-array name="gr2_display_mode">
<string name="dialog_ricoh_command_title_command">Send Message(RICOH)</string>
<string name="dialog_panasonic_command_title_command">Send Message(Panasonic)</string>
<string name="dialog_fujix_command_title_command">Send Message(FUJI)</string>
+ <string name="dialog_ptpip_command_title_command">Send Message(PTP/IP)</string>
<string name="dialog_title_command">Command</string>
<string name="dialog_command_id_hint">0x####</string>
<string name="dialog_message_type_name">Message Type</string>
<string name="dialog_title_body_length">Body Length</string>
<string name="dialog_message_body1_hint">0x########</string>
<string name="dialog_message_body2_hint">0x########</string>
+ <string name="dialog_message_body3_hint">0x########</string>
+ <string name="dialog_message_body4_hint">0x########</string>
<string name="dialog_title_message_body">Message Body</string>
<string name="dialog_send_message">Send</string>
<string name="dialog_button_liveview">to LiveView</string>