diff --git a/src/android_foo/.idea/misc.xml b/src/android_foo/.idea/misc.xml index a6da84d..db2ad9b 100644 --- a/src/android_foo/.idea/misc.xml +++ b/src/android_foo/.idea/misc.xml @@ -37,7 +37,7 @@ - + diff --git a/src/android_foo/.idea/workspace.xml b/src/android_foo/.idea/workspace.xml index 14ff544..1e7430f 100644 --- a/src/android_foo/.idea/workspace.xml +++ b/src/android_foo/.idea/workspace.xml @@ -47,9 +47,20 @@ - + + + + + + + + + + + + - + @@ -141,74 +152,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -2907,6 +2783,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3392,7 +3379,13 @@ @@ -3406,7 +3399,7 @@ - + @@ -3417,27 +3410,27 @@ + + - + + - - - @@ -3454,8 +3447,6 @@ - - @@ -3479,7 +3470,9 @@ - @@ -3488,122 +3481,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -3675,13 +3552,6 @@ - - - - - - - @@ -3689,18 +3559,10 @@ - - - - - - - - @@ -3708,7 +3570,6 @@ - @@ -3727,27 +3588,16 @@ - - - - - - - + - - - - - @@ -3757,114 +3607,305 @@ + + + + + + + + + + + - + - - + + - + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + - - + + + + + - + + + + - - + + + + + + + + + + - + + + + - - + + - + + + + - - - - - + + - + + + + - + - + + + + - - + + - + + + + - + - + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/android_foo/control_app/src/main/java/com/robotca/ControlApp/Core/Plans/RandomWalkPlan.java b/src/android_foo/control_app/src/main/java/com/robotca/ControlApp/Core/Plans/RandomWalkPlan.java index 29aec79..668dca9 100644 --- a/src/android_foo/control_app/src/main/java/com/robotca/ControlApp/Core/Plans/RandomWalkPlan.java +++ b/src/android_foo/control_app/src/main/java/com/robotca/ControlApp/Core/Plans/RandomWalkPlan.java @@ -2,11 +2,8 @@ import com.robotca.ControlApp.Core.ControlMode; import com.robotca.ControlApp.Core.RobotController; -import android.media.AudioManager; -import android.media.ToneGenerator; import java.util.Random; -import java.util.Timer; import sensor_msgs.LaserScan; diff --git a/src/android_foo/control_app/src/main/java/com/robotca/ControlApp/Fragments/AboutFragment.java b/src/android_foo/control_app/src/main/java/com/robotca/ControlApp/Fragments/AboutFragment.java index 71f1be3..f74ba8a 100644 --- a/src/android_foo/control_app/src/main/java/com/robotca/ControlApp/Fragments/AboutFragment.java +++ b/src/android_foo/control_app/src/main/java/com/robotca/ControlApp/Fragments/AboutFragment.java @@ -1,18 +1,12 @@ package com.robotca.ControlApp.Fragments; +import android.annotation.SuppressLint; import android.app.Fragment; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; - -import android.app.Activity; import android.os.Bundle; -import android.text.Html; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.webkit.WebView; -import android.widget.TextView; import com.robotca.ControlApp.Core.Utils; import com.robotca.ControlApp.R; @@ -35,7 +29,7 @@ public AboutFragment() {} @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View view = inflater.inflate(R.layout.fragment_about, null); + @SuppressLint("InflateParams") View view = inflater.inflate(R.layout.fragment_about, null); WebView webView = (WebView) view.findViewById(R.id.abouttxt); webView.loadData(Utils.readText(getActivity(), R.raw.about), "text/html", null); diff --git a/src/android_foo/control_app/src/main/java/com/robotca/ControlApp/Fragments/AboutFragmentRobotChooser.java b/src/android_foo/control_app/src/main/java/com/robotca/ControlApp/Fragments/AboutFragmentRobotChooser.java index 22f87bb..91f23c3 100644 --- a/src/android_foo/control_app/src/main/java/com/robotca/ControlApp/Fragments/AboutFragmentRobotChooser.java +++ b/src/android_foo/control_app/src/main/java/com/robotca/ControlApp/Fragments/AboutFragmentRobotChooser.java @@ -1,28 +1,27 @@ package com.robotca.ControlApp.Fragments; +import android.annotation.SuppressLint; import android.os.Bundle; import android.support.v4.app.Fragment; -import android.text.Html; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.webkit.WebView; -import android.widget.TextView; +import com.robotca.ControlApp.Core.Utils; import com.robotca.ControlApp.R; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; - /** + * About Fragment for the Robot Chooser screen. + * * Created by Kenneth Spear on 3/15/16. */ public class AboutFragmentRobotChooser extends Fragment { - public AboutFragmentRobotChooser() { - - } + /** + * Default Constructor. + */ + public AboutFragmentRobotChooser() {} /** * Called when the activity is created. @@ -30,40 +29,14 @@ public AboutFragmentRobotChooser() { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View view = inflater.inflate(R.layout.fragment_about, null); + @SuppressLint("InflateParams") View view = inflater.inflate(R.layout.fragment_about, null); -// TextView aboutTxt = (TextView) view.findViewById(R.id.abouttxt); -// aboutTxt.setText(Html.fromHtml(readTxt())); WebView webView = (WebView) view.findViewById(R.id.abouttxt); - webView.loadData(readTxt(), "text/html", null); + webView.loadData(Utils.readText(getActivity(), R.raw.about), "text/html", null); return view; } - - private String readTxt() { - - InputStream inputStream = getResources().openRawResource(R.raw.about); - - ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - - int i; - try { - i = inputStream.read(); - while (i != -1) { - byteArrayOutputStream.write(i); - i = inputStream.read(); - } - inputStream.close(); - } - catch (IOException e) { - - e.printStackTrace(); - } - - return byteArrayOutputStream.toString(); - - } } diff --git a/src/android_foo/control_app/src/main/res/layout-land/fragment_overview.xml b/src/android_foo/control_app/src/main/res/layout-land/fragment_overview.xml index 7aaef06..d165d16 100644 --- a/src/android_foo/control_app/src/main/res/layout-land/fragment_overview.xml +++ b/src/android_foo/control_app/src/main/res/layout-land/fragment_overview.xml @@ -1,45 +1,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/android_foo/control_app/src/main/res/layout-land/main.xml b/src/android_foo/control_app/src/main/res/layout-land/main.xml index a010ca0..2e4e5ca 100644 --- a/src/android_foo/control_app/src/main/res/layout-land/main.xml +++ b/src/android_foo/control_app/src/main/res/layout-land/main.xml @@ -35,14 +35,7 @@ android:layout_alignParentRight="true" android:layout_alignParentEnd="true" tools:layout="@layout/fragment_joystick_view" /> - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/android_foo/control_app/src/main/res/layout/dialog_add_robot.xml b/src/android_foo/control_app/src/main/res/layout/dialog_add_robot.xml index 83e4bf1..dcf646d 100644 --- a/src/android_foo/control_app/src/main/res/layout/dialog_add_robot.xml +++ b/src/android_foo/control_app/src/main/res/layout/dialog_add_robot.xml @@ -6,7 +6,7 @@ android:scrollbars="vertical" android:scrollbarAlwaysDrawVerticalTrack="true" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="wrap_content"> + android:text="@string/show_advanced_options"/> - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/android_foo/control_app/src/main/res/layout/fragment_overview.xml b/src/android_foo/control_app/src/main/res/layout/fragment_overview.xml index 76478bf..a897ef1 100644 --- a/src/android_foo/control_app/src/main/res/layout/fragment_overview.xml +++ b/src/android_foo/control_app/src/main/res/layout/fragment_overview.xml @@ -1,21 +1,9 @@ - - - - - - - - - - - - - - - - - diff --git a/src/android_foo/control_app/src/main/res/layout/main.xml b/src/android_foo/control_app/src/main/res/layout/main.xml index e7c8991..49e1ce7 100644 --- a/src/android_foo/control_app/src/main/res/layout/main.xml +++ b/src/android_foo/control_app/src/main/res/layout/main.xml @@ -35,13 +35,7 @@ android:layout_alignParentEnd="true" android:layout_alignParentBottom="true" tools:layout="@layout/fragment_joystick_view" /> - - - - - - - + - - - - - - - - - - - - - --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/android_foo/control_app/src/main/res/layout/nav_drawer_menu_item.xml b/src/android_foo/control_app/src/main/res/layout/nav_drawer_menu_item.xml index 00c59ea..c02df9a 100644 --- a/src/android_foo/control_app/src/main/res/layout/nav_drawer_menu_item.xml +++ b/src/android_foo/control_app/src/main/res/layout/nav_drawer_menu_item.xml @@ -12,13 +12,14 @@ android:alpha="54" android:layout_marginLeft="16dp" android:layout_marginRight="16dp" - android:src="@drawable/ic_android_black_24dp"> + android:src="@drawable/ic_android_black_24dp"/>