Skip to content

Commit

Permalink
Adding a menu button next to the keyboard button for newer devices th…
Browse files Browse the repository at this point in the history
…at don't show

the overflow menu.
  • Loading branch information
iiordanov committed Sep 4, 2015
1 parent 607be80 commit 4a79c12
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 87 deletions.
80 changes: 0 additions & 80 deletions eclipse_projects/Opaque/jni/libs/deps/include/openssl/comp.h

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions eclipse_projects/ZoomerWithKeys/res/layout/zoom_controls.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<ImageButton android:id="@+id/showMenu"
android:background="@drawable/ic_menu_moreoverflow_normal_holo_light"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<ZoomButton android:id="@+id/zoomIn"
android:background="@drawable/btn_zoom_up"
android:layout_width="wrap_content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public class ZoomControls extends LinearLayout {
private final ZoomButton mZoomIn;
private final ZoomButton mZoomOut;
private final ImageButton mZoomKeyboard;
private final ImageButton showMenu;
private boolean disabled = false;

public ZoomControls(Context context) {
Expand All @@ -70,6 +71,7 @@ public ZoomControls(Context context, AttributeSet attrs) {
mZoomIn = (ZoomButton) findViewById(R.id.zoomIn);
mZoomOut = (ZoomButton) findViewById(R.id.zoomOut);
mZoomKeyboard = (ImageButton) findViewById(R.id.zoomKeys);
showMenu = (ImageButton) findViewById(R.id.showMenu);
}

public void setOnZoomInClickListener(OnClickListener listener) {
Expand All @@ -84,6 +86,10 @@ public void setOnZoomKeyboardClickListener(OnClickListener listener) {
mZoomKeyboard.setOnClickListener(listener);
}

public void setOnShowMenuClickListener(OnClickListener listener) {
showMenu.setOnClickListener(listener);
}

/*
* Sets how fast you get zoom events when the user holds down the
* zoom in/out buttons.
Expand Down
2 changes: 1 addition & 1 deletion eclipse_projects/bVNC/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.iiordanov.bVNC" android:installLocation="auto"
android:versionCode="3770" android:versionName="v3.7.7">
android:versionCode="3780" android:versionName="v3.7.8">

<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10"></uses-sdk>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,18 +308,20 @@ public void onGlobalLayout() {
zoomer.hide();

zoomer.setOnZoomKeyboardClickListener(new View.OnClickListener() {

/*
* (non-Javadoc)
*
* @see android.view.View.OnClickListener#onClick(android.view.View)
*/
@Override
public void onClick(View v) {
InputMethodManager inputMgr = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
inputMgr.toggleSoftInput(0, 0);
}

});

zoomer.setOnShowMenuClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
RemoteCanvasActivity.this.openOptionsMenu();
}

});
panner = new Panner(this, canvas.handler);

Expand Down

0 comments on commit 4a79c12

Please sign in to comment.