reworked a whole bunch of stuff

moved from assistant to one single activity model with dialogs and navigation drawer as main content holder
completed separate threaded queue based service to communicate with daemon(s)
added first few elements to the nav drawer
This commit is contained in:
Giovanni Harting
2015-09-01 05:56:48 +02:00
parent ab8b864bee
commit aaa9c5da02
51 changed files with 677 additions and 2037 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 B

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="#000000" />
</shape>

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="8dp"
android:paddingRight="8dp" >
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:drawSelectorOnTop="false" />
</LinearLayout>

View File

@@ -1,21 +0,0 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<com.chiralcode.colorpicker.MultiColorPicker
android:id="@+id/multiColorPicker"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_weight="0.8" />
<Button
android:id="@+id/button"
android:layout_width="100dp"
android:layout_height="0dp"
android:layout_gravity="center_horizontal"
android:layout_weight="0.2"
android:text="@string/button_label" />
</LinearLayout>

View File

@@ -1,21 +0,0 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<com.chiralcode.colorpicker.ColorPicker
android:id="@+id/colorPicker"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_weight="0.8" />
<Button
android:id="@+id/button"
android:layout_width="100dp"
android:layout_height="0dp"
android:layout_gravity="center_horizontal"
android:layout_weight="0.2"
android:text="@string/button_label" />
</LinearLayout>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:key="example_preferences" >
<com.chiralcode.colorpicker.ColorPickerPreference
android:defaultValue="0xffffffff"
android:key="color"
android:title="@string/pref_name"
android:summary="@string/pref_summary" />
</PreferenceScreen>

View File

@@ -1,25 +1,40 @@
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout"
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">
<!-- The main content view -->
<com.idlegandalf.ledd.utils.ColorPicker
android:id="@+id/colorPicker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?android:attr/actionBarSize"/>
<FrameLayout
android:id="@+id/stripe_container"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
<!-- The navigation drawer -->
<fragment
android:name="com.idlegandalf.ledd.DrawerFragment"
android:id="@+id/drawer"
android:name="com.idlegandalf.ledd.DrawerFragment"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
tools:layout="@layout/drawer_fragment" />
tools:layout="@layout/drawer_fragment"/>
</android.support.v4.widget.DrawerLayout>

View File

@@ -1,8 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical" >
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white">
</LinearLayout>
<LinearLayout
android:id="@+id/lay_settings"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:orientation="horizontal"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingTop="5dp">
<ImageView
android:layout_width="@dimen/nd_icon"
android:layout_height="@dimen/nd_icon"
android:layout_marginLeft="@dimen/space_before_icon"
android:src="@drawable/ic_tune_black_48dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="10dp"
android:text="Settings"
android:textAppearance="@style/TextAppearance.AppCompat.Button"/>
</LinearLayout>
<LinearLayout
android:id="@+id/lay_add_host"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/lay_settings"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:orientation="horizontal"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingTop="5dp">
<ImageView
android:layout_width="@dimen/nd_icon"
android:layout_height="@dimen/nd_icon"
android:layout_marginLeft="@dimen/space_before_icon"
android:src="@drawable/ic_add_box_black_48dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="10dp"
android:text="Add Host"
android:textAppearance="@style/TextAppearance.AppCompat.Button"/>
</LinearLayout>
<LinearLayout
android:id="@+id/listview_controller_lay"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/lay_add_host">
<ExpandableListView
android:id="@+id/listview_controller"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
</RelativeLayout>

View File

@@ -1,84 +0,0 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linlayp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".StepOneActivity">
<TextView
android:id="@+id/text_welcome_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:text="Step 1.1: Select Controller manually"
android:textAppearance="?android:attr/textAppearanceLarge" />
<Button
android:id="@+id/step2_next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:text="test controller" />
<Button
android:id="@+id/step2_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:text="back" />
<LinearLayout
android:id="@+id/linBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/text_welcome_title"
android:layout_centerHorizontal="true"
android:layout_marginTop="50dp"
android:orientation="horizontal">
<android.support.design.widget.TextInputLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<EditText
android:id="@+id/ipSelect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|left"
android:ems="8"
android:gravity="center_horizontal"
android:hint="IP address"
android:imeOptions="actionNext"
android:inputType="phone"
android:maxLength="15" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<EditText
android:id="@+id/portSelect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:ems="4"
android:gravity="center_horizontal"
android:hint="port"
android:imeActionLabel="Test"
android:inputType="phone"
android:maxLength="5" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
</RelativeLayout>

View File

@@ -1,93 +0,0 @@
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin">
<TextView
android:id="@+id/text_welcome_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:text="Welcome"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textStyle="bold"/>
<TextView
android:id="@+id/welcome_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/text_welcome_title"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:text="Welcome to the RGB Stripe Control App. This assistent gives you an step-by-step introduction to setup your stripe configuration."
android:textAppearance="?android:attr/textAppearanceMedium"/>
<Button
android:id="@+id/step1_auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:text="autosearch"/>
<Button
android:id="@+id/step1_manual"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:text="set manual"/>
<TextView
android:id="@+id/text_choose"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/step1_auto"
android:layout_centerHorizontal="true"
android:layout_marginBottom="18dp"
android:text="choose way to select contoller"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_above="@id/text_choose"
android:layout_below="@id/welcome_text"
android:layout_marginBottom="20dp"
android:layout_marginTop="20dp">
<LinearLayout
android:id="@+id/host_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"/>
</ScrollView>
</RelativeLayout>
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|enterAlways"/>
</android.support.design.widget.AppBarLayout>
</android.support.design.widget.CoordinatorLayout>

View File

@@ -1,10 +1,5 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:com.gh.stripecontrol="http://schemas.android.com/apk/res-auto" >
<menu
>
<item
android:id="@+id/action_settings"
com.gh.stripecontrol:showAsAction="always"
android:title=""
android:icon="@drawable/ic_action_settings" />
</menu>

View File

@@ -1,4 +0,0 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
</menu>

View File

@@ -1,3 +0,0 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
</menu>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="primaryColor">#3ae765</color>
<color name="primaryColorDark">#69cc59</color>
</resources>

View File

@@ -3,5 +3,7 @@
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="nd_icon">30dp</dimen>
<dimen name="space_before_icon">7dp</dimen>
</resources>

View File

@@ -15,6 +15,11 @@
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
<!-- ...and here we setting appcompats color theming attrs -->
<item name="colorPrimary">@color/primaryColor</item>
<item name="colorPrimaryDark">@color/primaryColorDark</item>
</style>
</resources>