Skip to content

ExtTinker App (RGB-LED control, RX/TX digitalRead/Write) #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SparkCore/.project
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<name>SparkCore</name>
<comment></comment>
<projects>
<project>Fontify</project>
</projects>
<buildSpec>
<buildCommand>
Expand Down
11 changes: 9 additions & 2 deletions SparkCore/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.spark.core.android"
android:versionCode="4"
android:versionName="0.1.2" >
android:versionName="0.1.2.rgb" >

<uses-sdk
android:minSdkVersion="14"
Expand All @@ -13,6 +13,8 @@
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.VIBRATE"/>
<!-- <uses-permission android:name="android.permission.CAMERA"/> -->

<application
android:name="io.spark.core.android.app.SparkCoreApp"
Expand All @@ -32,7 +34,12 @@

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</activity>
<activity
android:name="io.spark.core.android.ui.AlterHostActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.NoActionBar"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name="io.spark.core.android.ui.LoginActivity"
android:screenOrientation="portrait"
Expand Down
Binary file added SparkCore/res/drawable-hdpi/ic_action_ext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SparkCore/res/drawable-hdpi/ic_action_noext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SparkCore/res/drawable-mdpi/ic_action_ext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SparkCore/res/drawable-mdpi/ic_action_noext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SparkCore/res/drawable-xhdpi/ic_action_ext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SparkCore/res/drawable-xhdpi/ic_action_noext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SparkCore/res/drawable-xxhdpi/ic_action_ext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SparkCore/res/drawable-xxhdpi/ic_action_noext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions SparkCore/res/drawable/alter_host_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:antialias="true"
android:dither="true"
android:filter="true"
android:src="@drawable/alter_host_background_bitmap"
android:tileMode="disabled" />
11 changes: 11 additions & 0 deletions SparkCore/res/drawable/alter_host_button_gradient.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >

<gradient
android:angle="90"
android:endColor="#FFE1F945"
android:startColor="#FFA5E52D"
android:type="linear" />

</shape>
11 changes: 11 additions & 0 deletions SparkCore/res/drawable/alter_host_button_pressed_gradient.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >

<gradient
android:angle="90"
android:endColor="#CFC9D900"
android:startColor="#CF25D900"
android:type="linear" />

</shape>
7 changes: 7 additions & 0 deletions SparkCore/res/drawable/alter_host_button_selector.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

<item android:drawable="@drawable/alter_host_button_pressed_gradient" android:state_pressed="true"/> <!-- pressed -->
<item android:drawable="@drawable/alter_host_button_gradient"/> <!-- default -->

</selector>
12 changes: 12 additions & 0 deletions SparkCore/res/drawable/rgb_led.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >

<solid android:color="#AAFFFFFF" />

<size
android:height="32dp"
android:width="32dp" />

</shape>

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified SparkCore/res/drawable/tinker_core_shadow_temp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SparkCore/res/drawable/tinker_hue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SparkCore/res/drawable/tinker_logo_cogg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SparkCore/res/drawable/tinker_logo_cogg_led.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SparkCore/res/drawable/tinker_logo_title.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion SparkCore/res/drawable/tinker_pin_read_high.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

<stroke
android:width="3dip"
android:color="@color/cyan" />
android:color="@color/alizarin" />

</shape>
2 changes: 1 addition & 1 deletion SparkCore/res/drawable/tinker_pin_write_high.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

<stroke
android:width="3dip"
android:color="@color/alizarin" />
android:color="@color/cyan" />

</shape>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
138 changes: 138 additions & 0 deletions SparkCore/res/layout/activity_alter_host.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
<?xml version="1.0" encoding="UTF-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fontify="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/alter_host_background"
android:orientation="vertical"
tools:context=".AlterHostActivity" >

<ScrollView
android:id="@+id/scroll_area"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top" >

<LinearLayout
style="@style/FormContainer"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingTop="@dimen/logo_top_margin" >

<ImageView
android:id="@+id/spark_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:maxWidth="150dp"
android:src="@drawable/spark_logo_temp"
tools:ignore="ContentDescription" />

<LinearLayout
style="@style/FormContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"
android:gravity="center_horizontal"
android:orientation="horizontal" >

<Spinner
android:id="@+id/select_url_scheme"
style="@style/SparkEditText"
android:layout_width="0dip"
android:layout_weight="1"
android:entries="@array/api_url_schemes"
android:paddingRight="1dp"
android:prompt="@string/api_url_scheme" />

<TextView
style="@style/SparkEditText"
android:layout_width="wrap_content"
android:paddingLeft="1dp"
android:paddingRight="1dp"
android:text="://" />

<com.danh32.fontify.EditText
android:id="@+id/host_server"
style="@style/SparkEditText.Padded"
android:layout_width="0dip"
android:layout_weight="4"
android:hint="@string/prod_hostname"
android:inputType="textUri"
android:paddingLeft="1dp" >

<requestFocus />
</com.danh32.fontify.EditText>
</LinearLayout>

<com.danh32.fontify.EditText
android:id="@+id/host_port"
style="@style/SparkEditText.Padded"
android:layout_width="match_parent"
android:layout_marginTop="8dp"
android:hint="@integer/api_host_port"
android:inputType="number" />

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp" >

<com.danh32.fontify.Button
android:id="@+id/alter_host_button"
style="@style/SparkButton"
android:layout_centerVertical="true"
android:background="@drawable/alter_host_button_selector"
android:text="@string/action_alter_host" />

<ProgressBar
android:id="@+id/progress_indicator"
style="@style/SparkSpinner"
android:layout_alignLeft="@id/alter_host_button"
android:visibility="invisible" />
</RelativeLayout>

<com.danh32.fontify.TextView
style="@style/FinePrint"
android:layout_width="@dimen/account_widget_width"
android:layout_height="0dp"
android:layout_gravity="bottom|center_horizontal"
android:layout_marginTop="24dp"
android:layout_weight="1"
android:gravity="center_horizontal|bottom"
android:text="@string/alter_host_hint" />
</LinearLayout>
</ScrollView>

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone" >

<com.danh32.fontify.TextView
android:id="@+id/no_account_yet"
style="@style/LinkText"
android:layout_width="wrap_content"
android:layout_marginTop="3dp"
android:text="@string/i_dont_have_an_account" />

<com.danh32.fontify.TextView
android:id="@+id/already_have_account"
style="@style/LinkText"
android:layout_width="wrap_content"
android:layout_marginTop="3dp"
android:text="@string/i_already_have_an_account" />

<com.danh32.fontify.EditText
android:id="@+id/url_scheme"
style="@style/SparkEditText.Padded"
android:layout_width="wrap_content"
android:hint="@string/api_url_scheme"
android:inputType="textUri" />
</RelativeLayout>

</FrameLayout>
25 changes: 18 additions & 7 deletions SparkCore/res/layout/activity_log_in.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fontify="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/log_in_background"
android:orientation="vertical"
tools:context=".LoginActivity" >

<ScrollView
android:id="@+id/scroll_area"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
android:layout_height="wrap_content"
android:layout_gravity="top" >

<LinearLayout
style="@style/FormContainer"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/logo_top_margin"
android:paddingTop="@dimen/logo_top_margin"
android:gravity="center_horizontal"
android:orientation="vertical" >

Expand All @@ -22,15 +26,15 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:maxWidth="163dp"
android:maxWidth="150dp"
android:src="@drawable/spark_logo_temp"
tools:ignore="ContentDescription" />

<com.danh32.fontify.EditText
android:id="@+id/email"
style="@style/SparkEditText.Padded"
android:layout_width="match_parent"
android:layout_marginTop="24dp"
android:layout_marginTop="16dp"
android:hint="@string/prompt_email"
android:inputType="textEmailAddress" >

Expand Down Expand Up @@ -70,15 +74,22 @@
<com.danh32.fontify.TextView
android:id="@+id/no_account_yet"
style="@style/LinkText"
android:layout_marginTop="12dp"
android:layout_marginTop="3dp"
android:text="@string/i_dont_have_an_account" />

<com.danh32.fontify.TextView
android:id="@+id/forgot_password"
style="@style/LinkText"
android:layout_marginBottom="16dp"
android:layout_marginTop="4dp"
android:layout_marginTop="3dp"
android:text="@string/action_forgot_password" />

<com.danh32.fontify.TextView
android:id="@+id/alter_host"
style="@style/LinkText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="@string/alter_host_link" />
</LinearLayout>
</ScrollView>

Expand Down
Loading