From 507734e36feeb30d4745a54d8fd2d232a536f50a Mon Sep 17 00:00:00 2001 From: n8fr8 Date: Tue, 31 Oct 2017 13:43:34 -0400 Subject: [PATCH] improve layout of main screen --- .../phoneypot/MonitorActivity.java | 17 ++--------------- ...{layout_running.xml => activity_monitor.xml} | 5 +++++ src/main/res/values/strings.xml | 3 ++- 3 files changed, 9 insertions(+), 16 deletions(-) rename src/main/res/layout/{layout_running.xml => activity_monitor.xml} (95%) diff --git a/src/main/java/info/guardianproject/phoneypot/MonitorActivity.java b/src/main/java/info/guardianproject/phoneypot/MonitorActivity.java index 4188231a..fa2fdb9f 100644 --- a/src/main/java/info/guardianproject/phoneypot/MonitorActivity.java +++ b/src/main/java/info/guardianproject/phoneypot/MonitorActivity.java @@ -13,32 +13,19 @@ import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageManager; -import android.content.res.Configuration; -import android.graphics.Camera; import android.os.Bundle; import android.os.CountDownTimer; import android.os.Environment; -import android.os.Handler; -import android.support.design.widget.FloatingActionButton; import android.support.v4.app.ActivityCompat; import android.support.v4.app.FragmentActivity; import android.support.v4.content.ContextCompat; -import android.text.InputType; import android.util.Log; -import android.view.DragEvent; import android.view.Gravity; -import android.view.Menu; -import android.view.MenuItem; import android.view.View; import android.widget.Button; -import android.widget.EditText; import android.widget.FrameLayout; import android.widget.NumberPicker; -import android.widget.RadioButton; import android.widget.TextView; -import android.widget.Toast; - -import org.w3c.dom.Text; import java.io.File; import java.io.FileOutputStream; @@ -72,7 +59,7 @@ protected void onCreate(Bundle savedInstanceState) { private void initLayout () { preferences = new PreferenceManager(getApplicationContext()); - setContentView(R.layout.layout_running); + setContentView(R.layout.activity_monitor); txtTimer = (TextView)findViewById(R.id.timer_text); viewTimer = findViewById(R.id.timer_container); @@ -222,7 +209,7 @@ public void onTick(long millisUntilFinished) { public void onFinish() { - viewTimer.setVisibility(View.GONE); + txtTimer.setText(R.string.status_on); initMonitor(); } diff --git a/src/main/res/layout/layout_running.xml b/src/main/res/layout/activity_monitor.xml similarity index 95% rename from src/main/res/layout/layout_running.xml rename to src/main/res/layout/activity_monitor.xml index 57e4f57b..8ed2461f 100644 --- a/src/main/res/layout/layout_running.xml +++ b/src/main/res/layout/activity_monitor.xml @@ -28,6 +28,11 @@ android:gravity="center_vertical|center_horizontal" > + Start Later Save Number - Cancel + Deactivate + ACTIVE \ No newline at end of file