Skip to content

Commit

Permalink
add UI to fill in GCM Project ID vs hardcoding it
Browse files Browse the repository at this point in the history
  • Loading branch information
serggl committed Oct 13, 2013
1 parent 73befae commit ec1e615
Show file tree
Hide file tree
Showing 3 changed files with 231 additions and 161 deletions.
76 changes: 55 additions & 21 deletions res/layout/main.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/white"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp" >

<Button
android:id="@+id/send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="16dp"
android:onClick="onClick"
android:text="@string/send" />

<TextView
android:id="@+id/display"
<LinearLayout
android:id="@+id/senderIdPanel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/send"
android:layout_centerHorizontal="true"
android:layout_marginTop="16dp"
android:text="@string/ready"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@android:color/black" />
android:orientation="vertical" >

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"
android:gravity="center"
android:text="@string/save_sender_id"
android:textAppearance="?android:attr/textAppearanceMedium" />

<EditText
android:id="@+id/senderIdInputView"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:layout_weight="1"
android:ems="10"
android:gravity="center"
android:inputType="numberDecimal" >
</EditText>

<Button
android:id="@+id/save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:text="@string/save" />
</LinearLayout>

<Button
android:id="@+id/send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"
android:text="@string/send" />

<TextView
android:id="@+id/display"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"
android:gravity="center_horizontal"
android:text="@string/ready"
android:textAppearance="?android:attr/textAppearanceMedium" />

</RelativeLayout>
</LinearLayout>
4 changes: 3 additions & 1 deletion res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="app_name">Anjlab SMS Gateway</string>
<string name="app_name">Android SMS Gateway</string>
<string name="send">Send Registration ID</string>
<string name="ready">You are set up and ready to send text messages!</string>
<string name="save">Save Project ID</string>
<string name="save_sender_id">Your GSM Project ID:</string>

</resources>
Loading

0 comments on commit ec1e615

Please sign in to comment.