more bug fixing

moved rate limiting to another class
navigation header is close to being functional
This commit is contained in:
Giovanni Harting
2015-10-31 22:30:25 +01:00
parent ce198af0ef
commit 2211186d9f
12 changed files with 202 additions and 78 deletions

View File

@@ -26,54 +26,66 @@
<!-- The main content view -->
<LinearLayout
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?android:attr/actionBarSize">
android:orientation="vertical">
<Switch
android:id="@+id/switch_onoff"
android:layout_width="wrap_content"
<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:layout_gravity="right"/>
android:background="?attr/colorPrimary"
android:minHeight="?android:attr/actionBarSize">
</android.support.v7.widget.Toolbar>
<Switch
android:id="@+id/switch_onoff"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"/>
<com.larswerkman.holocolorpicker.ColorPicker
android:id="@+id/picker"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="25dp"
app:color_center_radius="140dp"
app:color_wheel_radius="180dp"
app:color_wheel_thickness="30dp"/>
</android.support.v7.widget.Toolbar>
<com.larswerkman.holocolorpicker.SaturationBar
android:id="@+id/saturationbar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="15dp"
app:bar_thickness="15dp"/>
<com.larswerkman.holocolorpicker.ColorPicker
android:id="@+id/picker"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="25dp"
app:color_center_radius="100dp"
app:color_pointer_halo_radius="13dp"
app:color_pointer_radius="12dp"
app:color_wheel_radius="180dp"
app:color_wheel_thickness="20dp"/>
<com.larswerkman.holocolorpicker.ValueBar
android:id="@+id/valuebar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
app:bar_thickness="15dp"/>
<com.larswerkman.holocolorpicker.SaturationBar
android:id="@+id/saturationbar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="15dp"
app:bar_pointer_halo_radius="11dp"
app:bar_pointer_radius="10dp"
app:bar_thickness="15dp"/>
</LinearLayout>
<com.larswerkman.holocolorpicker.ValueBar
android:id="@+id/valuebar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
app:bar_pointer_halo_radius="11dp"
app:bar_pointer_radius="10dp"
app:bar_thickness="15dp"/>
</LinearLayout>
</ScrollView>
<!-- The navigation drawer -->
@@ -82,7 +94,6 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:headerLayout="@layout/navigation_header"
app:menu="@menu/navigation_drawer"/>
</android.support.v4.widget.DrawerLayout>

View File

@@ -46,7 +46,7 @@
android:layout_marginLeft="7dp"
android:layout_toRightOf="@id/img_host"
android:gravity="center"
android:text="Choose Daemon"
android:text="@string/text_choose_daemon"
android:textAppearance="?android:textAppearanceMedium"
/>

View File

@@ -26,18 +26,61 @@
android:theme="@style/ThemeOverlay.AppCompat.Dark">
<TextView
android:id="@+id/nvh_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:text="-- stripes infos go here --"
android:text="Name"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textSize="19sp"/>
<TextView
android:id="@+id/nvh_type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/nvh_name"
android:layout_marginTop="15dp"
android:text="type"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
<TextView
android:id="@+id/nvh_mapping"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/nvh_type"
android:layout_marginTop="5dp"
android:text="mapping"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
<TextView
android:id="@+id/nvh_hex_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/nvh_mapping"
android:layout_marginTop="5dp"
android:text="#hex"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
<ImageButton
android:layout_width="15dp"
android:layout_height="15dp"
android:id="@+id/nhv_delete"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:scaleType="center"
android:src="@drawable/ic_clear_white_48dp"/>
<ImageButton
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentBottom="true"
android:layout_marginRight="15dp"
android:layout_toLeftOf="@id/nhv_delete"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:scaleType="center"
android:src="@drawable/ic_mode_edit_white_24dp"/>
</RelativeLayout>

View File

@@ -18,6 +18,6 @@
-->
<resources>
<color name="primaryColor">#3ae765</color>
<color name="primaryColorDark">#69cc59</color>
<color name="primaryColor">#3ae88d</color>
<color name="primaryColorDark">#327D26</color>
</resources>

View File

@@ -43,7 +43,7 @@
<string name="snachbar_added_controller">Added Controller (Id=%1$d)</string>
<string name="snackbar_error">Error: </string>
<string name="snackbar_daemon_connection_failed">Couldn\'t connect to daemon at %1$s: %2$s</string>
<string name="snackbar_added_daemon_version">Added LedD Daemon version: </string>
<string name="snackbar_added_daemon_version">Added LedD Daemon version: %1$s</string>
<string name="snackbar_added_stripe_id">Added Stripe (Id=%1$d)</string>
<string name="snackbar_failed_add_stripe">Failed to add Stripe: </string>