mirror of
https://github.com/SimpleMobileTools/Simple-Flashlight.git
synced 2025-01-30 18:24:45 +01:00
display a stroboscope btn with temp icon
This commit is contained in:
parent
b8c2d5dfc2
commit
a33fdda462
@ -25,6 +25,7 @@ import butterknife.OnClick;
|
||||
public class MainActivity extends SimpleActivity {
|
||||
@BindView(R.id.toggle_btn) ImageView mToggleBtn;
|
||||
@BindView(R.id.bright_display_btn) ImageView mBrightDisplayBtn;
|
||||
@BindView(R.id.stroboscope_btn) ImageView mStroboscopeBtn;
|
||||
|
||||
private static Bus mBus;
|
||||
private static MyCameraImpl mCameraImpl;
|
||||
@ -37,6 +38,7 @@ public class MainActivity extends SimpleActivity {
|
||||
|
||||
mBus = BusProvider.getInstance();
|
||||
changeIconColor(R.color.translucent_white, mBrightDisplayBtn);
|
||||
changeIconColor(R.color.translucent_white, mStroboscopeBtn);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -74,6 +76,11 @@ public class MainActivity extends SimpleActivity {
|
||||
startActivity(new Intent(getApplicationContext(), BrightDisplayActivity.class));
|
||||
}
|
||||
|
||||
@OnClick(R.id.stroboscope_btn)
|
||||
public void launchStroboscope() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
@ -90,10 +97,8 @@ public class MainActivity extends SimpleActivity {
|
||||
mCameraImpl.handleCameraSetup();
|
||||
mCameraImpl.checkFlashlight();
|
||||
|
||||
if (mConfig.getBrightDisplay())
|
||||
mBrightDisplayBtn.setVisibility(View.VISIBLE);
|
||||
else
|
||||
mBrightDisplayBtn.setVisibility(View.GONE);
|
||||
mBrightDisplayBtn.setVisibility(mConfig.getBrightDisplay() ? View.VISIBLE : View.GONE);
|
||||
mStroboscopeBtn.setVisibility(mConfig.getStroboscope() ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -20,7 +20,15 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/bright_display_margin"
|
||||
android:background="@android:color/transparent"
|
||||
android:padding="@dimen/activity_margin"
|
||||
android:src="@mipmap/bright_display"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/stroboscope_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/bright_display_margin"
|
||||
android:padding="@dimen/activity_margin"
|
||||
android:src="@mipmap/bright_display"
|
||||
android:visibility="gone"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user