Skip to content
Browse files

work in progress android app added to repo

  • Loading branch information...
1 parent 99377f6 commit a8c2a45a7ad5bd8169d6a5a6c2db8a7f9439cad7 @hmms committed Nov 6, 2012
Showing with 524 additions and 0 deletions.
  1. +8 −0 GUI/Mobile/Android/StartLED/.classpath
  2. +33 −0 GUI/Mobile/Android/StartLED/.project
  3. +4 −0 GUI/Mobile/Android/StartLED/.settings/org.eclipse.jdt.core.prefs
  4. +25 −0 GUI/Mobile/Android/StartLED/AndroidManifest.xml
  5. +25 −0 GUI/Mobile/Android/StartLED/bin/AndroidManifest.xml
  6. BIN GUI/Mobile/Android/StartLED/bin/StartLED.apk
  7. BIN GUI/Mobile/Android/StartLED/bin/classes.dex
  8. BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/BuildConfig.class
  9. BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/MainActivity.class
  10. BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/R$attr.class
  11. BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/R$drawable.class
  12. BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/R$id.class
  13. BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/R$layout.class
  14. BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/R$menu.class
  15. BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/R$string.class
  16. BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/R$style.class
  17. BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/R.class
  18. BIN GUI/Mobile/Android/StartLED/bin/res/drawable-hdpi/ic_action_search.png
  19. BIN GUI/Mobile/Android/StartLED/bin/res/drawable-hdpi/ic_launcher.png
  20. BIN GUI/Mobile/Android/StartLED/bin/res/drawable-ldpi/ic_launcher.png
  21. BIN GUI/Mobile/Android/StartLED/bin/res/drawable-mdpi/ic_action_search.png
  22. BIN GUI/Mobile/Android/StartLED/bin/res/drawable-mdpi/ic_launcher.png
  23. BIN GUI/Mobile/Android/StartLED/bin/res/drawable-xhdpi/ic_action_search.png
  24. BIN GUI/Mobile/Android/StartLED/bin/res/drawable-xhdpi/ic_launcher.png
  25. BIN GUI/Mobile/Android/StartLED/bin/resources.ap_
  26. +6 −0 GUI/Mobile/Android/StartLED/gen/com/example/theone/BuildConfig.java
  27. +53 −0 GUI/Mobile/Android/StartLED/gen/com/example/theone/R.java
  28. BIN GUI/Mobile/Android/StartLED/ic_launcher-web.png
  29. BIN GUI/Mobile/Android/StartLED/libs/android-support-v4.jar
  30. +20 −0 GUI/Mobile/Android/StartLED/proguard-project.txt
  31. +14 −0 GUI/Mobile/Android/StartLED/project.properties
  32. BIN GUI/Mobile/Android/StartLED/res/drawable-hdpi/ic_action_search.png
  33. BIN GUI/Mobile/Android/StartLED/res/drawable-hdpi/ic_launcher.png
  34. BIN GUI/Mobile/Android/StartLED/res/drawable-ldpi/ic_launcher.png
  35. BIN GUI/Mobile/Android/StartLED/res/drawable-mdpi/ic_action_search.png
  36. BIN GUI/Mobile/Android/StartLED/res/drawable-mdpi/ic_launcher.png
  37. BIN GUI/Mobile/Android/StartLED/res/drawable-xhdpi/ic_action_search.png
  38. BIN GUI/Mobile/Android/StartLED/res/drawable-xhdpi/ic_launcher.png
  39. +123 −0 GUI/Mobile/Android/StartLED/res/layout/activity_main.xml
  40. +6 −0 GUI/Mobile/Android/StartLED/res/menu/activity_main.xml
  41. +5 −0 GUI/Mobile/Android/StartLED/res/values-v11/styles.xml
  42. +5 −0 GUI/Mobile/Android/StartLED/res/values-v14/styles.xml
  43. +12 −0 GUI/Mobile/Android/StartLED/res/values/strings.xml
  44. +5 −0 GUI/Mobile/Android/StartLED/res/values/styles.xml
  45. +180 −0 GUI/Mobile/Android/StartLED/src/com/example/theone/MainActivity.java
View
8 GUI/Mobile/Android/StartLED/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+ <classpathentry kind="output" path="bin/classes"/>
+</classpath>
View
33 GUI/Mobile/Android/StartLED/.project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>StartLED</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ApkBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
View
4 GUI/Mobile/Android/StartLED/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.source=1.5
View
25 GUI/Mobile/Android/StartLED/AndroidManifest.xml
@@ -0,0 +1,25 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.example.theone"
+ android:versionCode="1"
+ android:versionName="1.0" >
+
+ <uses-sdk
+ android:minSdkVersion="8"
+ android:targetSdkVersion="15" />
+
+ <application
+ android:icon="@drawable/ic_launcher"
+ android:label="@string/app_name"
+ android:theme="@style/AppTheme" >
+ <activity
+ android:name=".MainActivity"
+ android:label="@string/title_activity_main" >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+
+</manifest>
View
25 GUI/Mobile/Android/StartLED/bin/AndroidManifest.xml
@@ -0,0 +1,25 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.example.theone"
+ android:versionCode="1"
+ android:versionName="1.0" >
+
+ <uses-sdk
+ android:minSdkVersion="8"
+ android:targetSdkVersion="15" />
+
+ <application
+ android:icon="@drawable/ic_launcher"
+ android:label="@string/app_name"
+ android:theme="@style/AppTheme" >
+ <activity
+ android:name=".MainActivity"
+ android:label="@string/title_activity_main" >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+
+</manifest>
View
BIN GUI/Mobile/Android/StartLED/bin/StartLED.apk
Binary file not shown.
View
BIN GUI/Mobile/Android/StartLED/bin/classes.dex
Binary file not shown.
View
BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/BuildConfig.class
Binary file not shown.
View
BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/MainActivity.class
Binary file not shown.
View
BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/R$attr.class
Binary file not shown.
View
BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/R$drawable.class
Binary file not shown.
View
BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/R$id.class
Binary file not shown.
View
BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/R$layout.class
Binary file not shown.
View
BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/R$menu.class
Binary file not shown.
View
BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/R$string.class
Binary file not shown.
View
BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/R$style.class
Binary file not shown.
View
BIN GUI/Mobile/Android/StartLED/bin/classes/com/example/theone/R.class
Binary file not shown.
View
BIN GUI/Mobile/Android/StartLED/bin/res/drawable-hdpi/ic_action_search.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN GUI/Mobile/Android/StartLED/bin/res/drawable-hdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN GUI/Mobile/Android/StartLED/bin/res/drawable-ldpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN GUI/Mobile/Android/StartLED/bin/res/drawable-mdpi/ic_action_search.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN GUI/Mobile/Android/StartLED/bin/res/drawable-mdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN GUI/Mobile/Android/StartLED/bin/res/drawable-xhdpi/ic_action_search.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN GUI/Mobile/Android/StartLED/bin/res/drawable-xhdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN GUI/Mobile/Android/StartLED/bin/resources.ap_
Binary file not shown.
View
6 GUI/Mobile/Android/StartLED/gen/com/example/theone/BuildConfig.java
@@ -0,0 +1,6 @@
+/** Automatically generated file. DO NOT MODIFY */
+package com.example.theone;
+
+public final class BuildConfig {
+ public final static boolean DEBUG = true;
+}
View
53 GUI/Mobile/Android/StartLED/gen/com/example/theone/R.java
@@ -0,0 +1,53 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * aapt tool from the resource data it found. It
+ * should not be modified by hand.
+ */
+
+package com.example.theone;
+
+public final class R {
+ public static final class attr {
+ }
+ public static final class drawable {
+ public static final int ic_action_search=0x7f020000;
+ public static final int ic_launcher=0x7f020001;
+ }
+ public static final class id {
+ public static final int button1=0x7f070000;
+ public static final int menu_settings=0x7f07000e;
+ public static final int radioMode0=0x7f070002;
+ public static final int radioMode1=0x7f070003;
+ public static final int radioMode2=0x7f070004;
+ public static final int radioMode3=0x7f070005;
+ public static final int radioSex=0x7f070001;
+ public static final int seekBarBlue=0x7f07000b;
+ public static final int seekBarDelay=0x7f07000d;
+ public static final int seekBarGreen=0x7f070009;
+ public static final int seekBarRed=0x7f070007;
+ public static final int textViewBlue=0x7f07000a;
+ public static final int textViewDelay=0x7f07000c;
+ public static final int textViewGreen=0x7f070008;
+ public static final int textViewRed=0x7f070006;
+ }
+ public static final class layout {
+ public static final int activity_main=0x7f030000;
+ }
+ public static final class menu {
+ public static final int activity_main=0x7f060000;
+ }
+ public static final class string {
+ public static final int app_name=0x7f040000;
+ public static final int hello_world=0x7f040001;
+ public static final int menu_settings=0x7f040002;
+ public static final int mode0=0x7f040003;
+ public static final int mode1=0x7f040004;
+ public static final int mode2=0x7f040005;
+ public static final int mode3=0x7f040006;
+ public static final int title_activity_main=0x7f040007;
+ }
+ public static final class style {
+ public static final int AppTheme=0x7f050000;
+ }
+}
View
BIN GUI/Mobile/Android/StartLED/ic_launcher-web.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN GUI/Mobile/Android/StartLED/libs/android-support-v4.jar
Binary file not shown.
View
20 GUI/Mobile/Android/StartLED/proguard-project.txt
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
View
14 GUI/Mobile/Android/StartLED/project.properties
@@ -0,0 +1,14 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+# Project target.
+target=android-16
View
BIN GUI/Mobile/Android/StartLED/res/drawable-hdpi/ic_action_search.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN GUI/Mobile/Android/StartLED/res/drawable-hdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN GUI/Mobile/Android/StartLED/res/drawable-ldpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN GUI/Mobile/Android/StartLED/res/drawable-mdpi/ic_action_search.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN GUI/Mobile/Android/StartLED/res/drawable-mdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN GUI/Mobile/Android/StartLED/res/drawable-xhdpi/ic_action_search.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN GUI/Mobile/Android/StartLED/res/drawable-xhdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
123 GUI/Mobile/Android/StartLED/res/layout/activity_main.xml
@@ -0,0 +1,123 @@
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical" >
+
+ <Button
+ android:id="@+id/button1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Connected" />
+
+ <LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical" >
+
+ <RadioGroup
+ android:id="@+id/radioSex"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal" >
+
+ <RadioButton
+ android:id="@+id/radioMode0"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/mode0"
+ android:enabled="false" />
+
+ <RadioButton
+ android:id="@+id/radioMode1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/mode1"
+ android:enabled="false" />
+
+ <RadioButton
+ android:id="@+id/radioMode2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:checked="true"
+ android:text="@string/mode2"
+ android:enabled="false" />
+
+ <RadioButton
+ android:id="@+id/radioMode3"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/mode3"
+ android:enabled="false" />
+
+
+ </RadioGroup>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="0.05"
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@+id/textViewRed"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Red" />
+
+ <SeekBar
+ android:id="@+id/seekBarRed"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+ <TextView
+ android:id="@+id/textViewGreen"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Green" />
+
+ <SeekBar
+ android:id="@+id/seekBarGreen"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:clickable="false"
+ android:focusable="false"
+ android:longClickable="false" />
+
+ <TextView
+ android:id="@+id/textViewBlue"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Blue" />
+
+ <SeekBar
+ android:id="@+id/seekBarBlue"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:clickable="false"
+ android:focusable="false"
+ android:longClickable="false"
+ android:enabled="false" />
+
+ <TextView
+ android:id="@+id/textViewDelay"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Delay" />
+
+ <SeekBar
+ android:id="@+id/seekBarDelay"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:clickable="false"
+ android:focusable="false"
+ android:longClickable="false"
+ android:enabled="false" />
+
+ </LinearLayout>
+ </LinearLayout>
+
+
+
+</LinearLayout>
View
6 GUI/Mobile/Android/StartLED/res/menu/activity_main.xml
@@ -0,0 +1,6 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@+id/menu_settings"
+ android:title="@string/menu_settings"
+ android:orderInCategory="100"
+ android:showAsAction="never" />
+</menu>
View
5 GUI/Mobile/Android/StartLED/res/values-v11/styles.xml
@@ -0,0 +1,5 @@
+<resources>
+
+ <style name="AppTheme" parent="android:Theme.Holo.Light" />
+
+</resources>
View
5 GUI/Mobile/Android/StartLED/res/values-v14/styles.xml
@@ -0,0 +1,5 @@
+<resources>
+
+ <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar" />
+
+</resources>
View
12 GUI/Mobile/Android/StartLED/res/values/strings.xml
@@ -0,0 +1,12 @@
+<resources>
+
+ <string name="app_name">StartLED</string>
+ <string name="hello_world">Hello world!</string>
+ <string name="menu_settings">Settings</string>
+ <string name="mode0">Mode0</string>
+ <string name="mode1">mode1</string>
+ <string name="mode2">Mode2</string>
+ <string name="mode3">mode3</string>
+ <string name="title_activity_main">MainActivity</string>
+
+</resources>
View
5 GUI/Mobile/Android/StartLED/res/values/styles.xml
@@ -0,0 +1,5 @@
+<resources>
+
+ <style name="AppTheme" parent="android:Theme.Light" />
+
+</resources>
View
180 GUI/Mobile/Android/StartLED/src/com/example/theone/MainActivity.java
@@ -0,0 +1,180 @@
+package com.example.theone;
+
+import android.net.Uri;
+import android.os.Bundle;
+import android.app.Activity;
+import android.content.Intent;
+import android.view.Menu;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
+import android.widget.SeekBar;
+import android.widget.SeekBar.OnSeekBarChangeListener;
+import android.widget.TextView;
+import android.widget.Toast;
+import android.widget.RadioGroup.OnCheckedChangeListener;
+
+public class MainActivity extends Activity {
+
+ Button button;
+ private RadioGroup radioModeGroup;
+ private RadioButton radioSexButton;
+ SeekBar seekbarred;
+ SeekBar seekbargreen;
+ SeekBar seekbarblue;
+ SeekBar seekbardelay;
+ TextView valueRed;
+ TextView valueGreen;
+ TextView valueBlue;
+ TextView valueDelay;
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+ addListenerOnButton();
+ seekbarred.setVisibility(View.GONE);
+ seekbarblue.setVisibility(View.GONE);
+ seekbargreen.setVisibility(View.GONE);
+ }
+
+ public void addListenerOnButton() {
+ button=(Button) findViewById(R.id.button1);
+ radioModeGroup=(RadioGroup) findViewById(R.id.radioSex);
+ button.setOnClickListener(new OnClickListener() {
+
+ public void onClick(View v) {
+ // TODO Auto-generated method stub
+// Intent browserIntent =
+// new Intent(Intent.ACTION_VIEW, Uri.parse("http://about.me/the1pawan"));
+// startActivity(browserIntent);
+ for(int i = 0; i < radioModeGroup.getChildCount(); i++){
+ ((RadioButton)radioModeGroup.getChildAt(i)).setEnabled(true);
+ }
+ }
+ });
+
+ radioModeGroup.setOnCheckedChangeListener(new OnCheckedChangeListener() {
+
+ public void onCheckedChanged(RadioGroup group, int checkedId) {
+ // TODO Auto-generated method stub
+ if (checkedId==R.id.radioMode0) {
+ seekbarred.setVisibility(View.GONE);
+ seekbarblue.setVisibility(View.GONE);
+ seekbargreen.setVisibility(View.GONE);
+ Toast.makeText(MainActivity.this,"Mode0", Toast.LENGTH_SHORT).show();
+ }
+ else if (checkedId==R.id.radioMode1) {
+ seekbarred.setVisibility(View.GONE);
+ seekbarblue.setVisibility(View.GONE);
+ seekbargreen.setVisibility(View.GONE);
+ Toast.makeText(MainActivity.this,"Mode1", Toast.LENGTH_SHORT).show();
+ }
+ else if (checkedId==R.id.radioMode2) {
+ seekbarred.setVisibility(View.GONE);
+ seekbarblue.setVisibility(View.GONE);
+ seekbargreen.setVisibility(View.GONE);
+ Toast.makeText(MainActivity.this,"Mode2", Toast.LENGTH_SHORT).show();
+ }
+ else if (checkedId==R.id.radioMode3) {
+ Toast.makeText(MainActivity.this,"Mode3", Toast.LENGTH_SHORT).show();
+ seekbarred.setVisibility(View.VISIBLE);
+ seekbarblue.setVisibility(View.VISIBLE);
+ seekbargreen.setVisibility(View.VISIBLE);
+ }
+ }
+ });
+
+ seekbarred = (SeekBar) findViewById(R.id.seekBarRed);
+ valueRed=(TextView) findViewById(R.id.textViewRed);
+ seekbarred.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
+
+ public void onStopTrackingTouch(SeekBar seekBar) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void onStartTrackingTouch(SeekBar seekBar) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void onProgressChanged(SeekBar seekBar, int progress,
+ boolean fromUser) {
+ // TODO Auto-generated method stub
+ valueRed.setText("SeekBar value is "+progress);
+ }
+ });
+
+ seekbargreen=(SeekBar) findViewById(R.id.seekBarGreen);
+ valueGreen=(TextView) findViewById(R.id.textViewGreen);
+ seekbargreen.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
+
+ public void onStopTrackingTouch(SeekBar seekBar) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void onStartTrackingTouch(SeekBar seekBar) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void onProgressChanged(SeekBar seekBar, int progress,
+ boolean fromUser) {
+ // TODO Auto-generated method stub
+ valueGreen.setText("SeekBar value is "+progress);
+ }
+ });
+
+ seekbarblue=(SeekBar) findViewById(R.id.seekBarBlue);
+ valueBlue=(TextView) findViewById(R.id.textViewBlue);
+ seekbarblue.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
+
+ public void onStopTrackingTouch(SeekBar seekBar) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void onStartTrackingTouch(SeekBar seekBar) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void onProgressChanged(SeekBar seekBar, int progress,
+ boolean fromUser) {
+ // TODO Auto-generated method stub
+ valueBlue.setText("SeekBar value is "+progress);
+ }
+ });
+
+ seekbardelay=(SeekBar) findViewById(R.id.seekBarDelay);
+ valueDelay=(TextView) findViewById(R.id.textViewDelay);
+ seekbardelay.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
+
+ public void onStopTrackingTouch(SeekBar seekBar) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void onStartTrackingTouch(SeekBar seekBar) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void onProgressChanged(SeekBar seekBar, int progress,
+ boolean fromUser) {
+ // TODO Auto-generated method stub
+ valueDelay.setText("SeekBar value is "+progress);
+ }
+ });
+ }
+
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ getMenuInflater().inflate(R.menu.activity_main, menu);
+ return true;
+ }
+}

0 comments on commit a8c2a45

Please sign in to comment.
Something went wrong with that request. Please try again.