Skip to content

Commit

Permalink
hide timelapse and bracketing icons for non-touchscreen devices
Browse files Browse the repository at this point in the history
allow changing scene mode via dial
  • Loading branch information
obs committed Jul 10, 2016
1 parent 88e967f commit feb50e6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import android.app.Activity;
import android.content.Intent;
import android.view.KeyEvent;

import com.github.ma1co.openmemories.framework.DeviceInfo;
import com.sony.scalar.hardware.avio.DisplayManager;
import com.sony.scalar.sysutil.ScalarInput;
import com.sony.scalar.sysutil.didep.Gpelibrary;
Expand Down Expand Up @@ -216,4 +218,8 @@ protected void notifyAppInfo() {
public DisplayManager getDisplayManager() {
return displayManager;
}

public DeviceInfo getDeviceInfo() {
return DeviceInfo.getInstance();
}
}
21 changes: 20 additions & 1 deletion app/src/main/java/com/obsidium/bettermanual/ManualActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ else if (m_bracketActive)
private int m_curPreviewMagnificationMaxPos;
private PreviewNavView m_previewNavView;

enum DialMode { shutter, aperture, iso, exposure,
enum DialMode { shutter, aperture, iso, exposure, mode,
timelapseSetInterval, timelapseSetPicCount,
bracketSetStep, bracketSetPicCount
}
Expand Down Expand Up @@ -224,6 +224,13 @@ protected void onCreate(Bundle savedInstanceState)
setDialMode(DialMode.shutter);

m_prefs = new Preferences(this);

// Hide timelapse and bracketing icons for non-touchscreen devices
if (getDeviceInfo().getModel().compareTo("ILCE-5100") != 0)
{
m_ivBracket.setVisibility(View.GONE);
m_ivTimelapse.setVisibility(View.GONE);
}
}

private class SurfaceSwipeTouchListener extends OnSwipeTouchListener
Expand Down Expand Up @@ -1561,6 +1568,10 @@ private void setDialMode(DialMode newMode)
m_tvAperture.setTextColor(newMode == DialMode.aperture ? Color.GREEN : Color.WHITE);
m_tvISO.setTextColor(newMode == DialMode.iso ? Color.GREEN : Color.WHITE);
m_tvExposureCompensation.setTextColor(newMode == DialMode.exposure ? Color.GREEN : Color.WHITE);
if (newMode == DialMode.mode)
m_ivMode.setColorFilter(Color.argb(255, 0, 255, 0));
else
m_ivMode.setColorFilter(null);
}

private void movePreviewVertical(int delta)
Expand Down Expand Up @@ -1660,6 +1671,11 @@ else if (m_dialMode == DialMode.bracketSetPicCount)
startBracketCountdown();
return true;
}
else if (m_dialMode == DialMode.mode)
{
toggleSceneMode();
return true;
}
return false;
}

Expand Down Expand Up @@ -1704,6 +1720,9 @@ protected boolean onDownKeyUp()
setDialMode(DialMode.exposure);
break;
case exposure:
setDialMode(DialMode.mode);
break;
case mode:
setDialMode(DialMode.shutter);
break;
}
Expand Down

0 comments on commit feb50e6

Please sign in to comment.