diff --git a/eclipse_projects/bVNC/res/layout-large/canvas.xml b/eclipse_projects/bVNC/res/layout-large/canvas.xml index bab988ea6..c192752d6 100644 --- a/eclipse_projects/bVNC/res/layout-large/canvas.xml +++ b/eclipse_projects/bVNC/res/layout-large/canvas.xml @@ -17,7 +17,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/zoomer" - android:layout_gravity="center|right" android:padding="10sp" /> diff --git a/eclipse_projects/bVNC/res/layout/canvas.xml b/eclipse_projects/bVNC/res/layout/canvas.xml index bab988ea6..c192752d6 100644 --- a/eclipse_projects/bVNC/res/layout/canvas.xml +++ b/eclipse_projects/bVNC/res/layout/canvas.xml @@ -17,7 +17,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/zoomer" - android:layout_gravity="center|right" android:padding="10sp" /> diff --git a/eclipse_projects/bVNC/res/menu/androidvncmenu.xml b/eclipse_projects/bVNC/res/menu/androidvncmenu.xml index 1ba85a51b..376b6bd56 100644 --- a/eclipse_projects/bVNC/res/menu/androidvncmenu.xml +++ b/eclipse_projects/bVNC/res/menu/androidvncmenu.xml @@ -8,4 +8,5 @@ + \ No newline at end of file diff --git a/eclipse_projects/bVNC/res/values-pl/strings.xml b/eclipse_projects/bVNC/res/values-pl/strings.xml index 15dd40854..72acfe7ab 100644 --- a/eclipse_projects/bVNC/res/values-pl/strings.xml +++ b/eclipse_projects/bVNC/res/values-pl/strings.xml @@ -123,6 +123,7 @@ Nazwa listy Lista Wymuś poziomą orientację + Tryb mańkut Przyciski Zachowaj włączony ekran Zachowaj diff --git a/eclipse_projects/bVNC/res/values-ru/strings.xml b/eclipse_projects/bVNC/res/values-ru/strings.xml index 9139ecc15..fa5d31d10 100644 --- a/eclipse_projects/bVNC/res/values-ru/strings.xml +++ b/eclipse_projects/bVNC/res/values-ru/strings.xml @@ -280,6 +280,7 @@ Держать экран включенным Клавиши Альбомная ориентация +Режим левши Список Имя списка Локальный курсор мыши (выберите, если курсор мыши не виден) diff --git a/eclipse_projects/bVNC/res/values/strings.xml b/eclipse_projects/bVNC/res/values/strings.xml index f726a8a25..b7ea92a77 100644 --- a/eclipse_projects/bVNC/res/values/strings.xml +++ b/eclipse_projects/bVNC/res/values/strings.xml @@ -280,6 +280,7 @@ All Input Modes: Keep Screen Awake Keys Force Landscape Orientation +Left-Handed Mode List List Name Local mouse pointer (select if pointer is invisible) diff --git a/eclipse_projects/bVNC/src/com/iiordanov/bVNC/Constants.java b/eclipse_projects/bVNC/src/com/iiordanov/bVNC/Constants.java index ddc419b78..82f199bd5 100644 --- a/eclipse_projects/bVNC/src/com/iiordanov/bVNC/Constants.java +++ b/eclipse_projects/bVNC/src/com/iiordanov/bVNC/Constants.java @@ -199,6 +199,7 @@ public class Constants { public static final String disableImmersiveTag = "disableImmersive"; public static final String forceLandscapeTag = "forceLandscape"; public static final String rAltAsIsoL3ShiftTag = "rAltAsIsoL3Shift"; + public static final String leftHandedModeTag = "leftHandedModeTag"; public static final String ACTION_USB_PERMISSION = "com.iiordanov.aSPICE.USB_PERMISSION"; public static final int usbDeviceTimeout = 5000; diff --git a/eclipse_projects/bVNC/src/com/iiordanov/bVNC/MainConfiguration.java b/eclipse_projects/bVNC/src/com/iiordanov/bVNC/MainConfiguration.java index 38610e1f3..48fe1f0e2 100644 --- a/eclipse_projects/bVNC/src/com/iiordanov/bVNC/MainConfiguration.java +++ b/eclipse_projects/bVNC/src/com/iiordanov/bVNC/MainConfiguration.java @@ -287,6 +287,8 @@ public boolean onMenuOpened(int featureId, Menu menu) { forceLandscape.setChecked(Utils.querySharedPreferenceBoolean(this, Constants.forceLandscapeTag)); MenuItem rAltAsIsoL3Shift = menu.findItem(R.id.itemRAltAsIsoL3Shift); rAltAsIsoL3Shift.setChecked(Utils.querySharedPreferenceBoolean(this, Constants.rAltAsIsoL3ShiftTag)); + MenuItem itemLeftHandedMode = menu.findItem(R.id.itemLeftHandedMode); + itemLeftHandedMode.setChecked(Utils.querySharedPreferenceBoolean(this, Constants.leftHandedModeTag)); } return true; } @@ -348,6 +350,9 @@ public void onClick(DialogInterface dialog, int i) case R.id.itemRAltAsIsoL3Shift: Utils.toggleSharedPreferenceBoolean(this, Constants.rAltAsIsoL3ShiftTag); break; + case R.id.itemLeftHandedMode: + Utils.toggleSharedPreferenceBoolean(this, Constants.leftHandedModeTag); + break; } return true; } diff --git a/eclipse_projects/bVNC/src/com/iiordanov/bVNC/RemoteCanvasActivity.java b/eclipse_projects/bVNC/src/com/iiordanov/bVNC/RemoteCanvasActivity.java index e9da5adf4..082414f0c 100644 --- a/eclipse_projects/bVNC/src/com/iiordanov/bVNC/RemoteCanvasActivity.java +++ b/eclipse_projects/bVNC/src/com/iiordanov/bVNC/RemoteCanvasActivity.java @@ -49,6 +49,7 @@ import android.os.SystemClock; import android.support.v4.app.FragmentActivity; import android.util.Log; +import android.view.Gravity; import android.view.InputDevice; import android.view.KeyEvent; import android.view.Menu; @@ -67,7 +68,9 @@ import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; +import android.widget.FrameLayout; import android.widget.ImageButton; +import android.widget.LinearLayout; import android.widget.ListView; import android.widget.RelativeLayout; import android.widget.Toast; @@ -360,6 +363,18 @@ public void onClick(View v) { } }); + + FrameLayout.LayoutParams params = new FrameLayout.LayoutParams( + FrameLayout.LayoutParams.WRAP_CONTENT, + FrameLayout.LayoutParams.WRAP_CONTENT); + + if (Utils.querySharedPreferenceBoolean(this, Constants.leftHandedModeTag)) { + params.gravity = Gravity.CENTER|Gravity.LEFT; + } else { + params.gravity = Gravity.CENTER|Gravity.RIGHT; + } + zoomer.setLayoutParams(params); + panner = new Panner(this, canvas.handler); inputHandler = getInputHandlerById(R.id.itemInputTouchPanZoomMouse);