Skip to content

Commit

Permalink
[#4] Bye bye local files, now prepared questions will have to be uplo…
Browse files Browse the repository at this point in the history
…aded through smile-iqmanager before getting it on the teacher app
  • Loading branch information
chrqls committed Nov 22, 2013
1 parent b700e0f commit f11c088
Show file tree
Hide file tree
Showing 12 changed files with 615 additions and 268 deletions.
105 changes: 50 additions & 55 deletions res/layout-large-land/use_prepared_questions_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@

<View
android:id="@+id/view_separator"
android:layout_width="fill_parent"
android:layout_width="wrap_content"
android:layout_height="1dip"
android:background="@color/gray"
android:layout_margin="5dip"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:layout_below="@+id/bt_close"/>

<TextView
Expand All @@ -49,61 +50,28 @@

<View
android:id="@+id/view_separator2"
android:layout_width="fill_parent"
android:layout_width="wrap_content"
android:layout_height="1dip"
android:background="@color/gray"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:layout_marginBottom="20dip"
android:layout_alignParentBottom="true"/>

<Button
android:id="@+id/bt_ok"
android:layout_width="100dip"
android:layout_height="wrap_content"
android:text="@string/load"
android:textSize="12sp"
android:layout_marginBottom="10dip"
android:layout_centerHorizontal="true"
android:layout_above="@+id/view_separator2"/>

<View
android:id="@+id/view_separator_middle"
android:layout_width="1dip"
android:layout_height="fill_parent"
android:background="@color/gray"
android:layout_margin="20dip"
android:layout_centerInParent="true"
android:layout_below="@+id/view_separator"
android:layout_above="@+id/bt_ok"/>

<ListView
android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:choiceMode="singleChoice"
android:layout_marginTop="10dip"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:layout_marginBottom="20dip"
android:layout_above="@+id/bt_ok"
android:layout_alignParentLeft="true"
android:layout_below="@+id/tv_select_item"
android:layout_above="@+id/bt_ok"
android:layout_marginBottom="10dip"
android:layout_marginLeft="10dip"
android:layout_marginTop="10dip"
android:layout_toLeftOf="@+id/view_separator_middle"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="10.0sp"/>

<CheckBox
android:id="@+id/cb_questions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/use_time"
android:textColor="@color/black"
android:textSize="12sp"
android:layout_marginTop="5dip"
android:layout_marginRight="10dip"
android:layout_toRightOf="@+id/view_separator_middle"
android:layout_below="@+id/view_separator"/>
android:dividerHeight="10.0sp" />

<TextView
android:id="@+id/tv_hours_spinner"
Expand All @@ -113,19 +81,17 @@
android:textSize="12sp"
android:textColor="@color/black"
android:layout_marginTop="10dip"
android:layout_marginLeft="20dip"
android:layout_toRightOf="@+id/view_separator_middle"
android:layout_below="@+id/cb_questions"/>

<Spinner
android:id="@+id/sp_hours"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:prompt="@string/hours"
android:layout_marginLeft="65dip"
android:layout_marginRight="50dip"
android:layout_toRightOf="@+id/tv_hours_spinner"
android:layout_below="@+id/cb_questions"/>
android:layout_alignLeft="@+id/sp_seconds"
android:layout_below="@+id/cb_questions"
android:layout_marginRight="20dip"
android:prompt="@string/hours" />

<TextView
android:id="@+id/tv_minutes_spinner"
Expand All @@ -135,7 +101,6 @@
android:textSize="12sp"
android:textColor="@color/black"
android:layout_marginTop="30dip"
android:layout_marginLeft="20dip"
android:layout_toRightOf="@+id/view_separator_middle"
android:layout_below="@+id/tv_hours_spinner"/>

Expand All @@ -145,9 +110,9 @@
android:layout_height="wrap_content"
android:prompt="@string/minutes"
android:layout_marginTop="15dip"
android:layout_marginLeft="55dip"
android:layout_marginRight="50dip"
android:layout_toRightOf="@+id/tv_minutes_spinner"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:layout_toRightOf="@+id/tv_seconds_spinner"
android:layout_below="@+id/tv_hours_spinner"/>

<TextView
Expand All @@ -158,7 +123,6 @@
android:textSize="12sp"
android:textColor="@color/black"
android:layout_marginTop="25dip"
android:layout_marginLeft="20dip"
android:layout_toRightOf="@+id/view_separator_middle"
android:layout_below="@+id/tv_minutes_spinner"/>

Expand All @@ -168,9 +132,40 @@
android:layout_height="wrap_content"
android:prompt="@string/seconds"
android:layout_marginTop="11dip"
android:layout_marginLeft="50dip"
android:layout_marginRight="50dip"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:layout_toRightOf="@+id/tv_seconds_spinner"
android:layout_below="@+id/tv_minutes_spinner"/>

<View
android:id="@+id/view_separator_middle"
android:layout_width="1dip"
android:layout_height="wrap_content"
android:layout_above="@+id/view_separator2"
android:layout_below="@+id/bt_close"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_toLeftOf="@+id/cb_questions"
android:background="@color/gray" />

<CheckBox
android:id="@+id/cb_questions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="25dp"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/view_separator"
android:text="@string/use_time"
android:textColor="@color/black"
android:textSize="12sp" />

<Button
android:id="@+id/bt_ok"
android:layout_width="100dip"
android:layout_height="wrap_content"
android:layout_above="@+id/view_separator2"
android:layout_centerHorizontal="true"
android:text="@string/load"
android:textSize="12sp" />

</RelativeLayout>
20 changes: 20 additions & 0 deletions res/layout-large-land/use_prepared_questions_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,26 @@
android:textColor="@color/black"
android:focusable="false"
android:layout_gravity="left|center_vertical"/>

<TextView
android:id="@+id/tv_teacher_name"
android:textSize="12sp"
android:layout_width="100dip"
android:layout_height="match_parent"
android:text="@string/teacher_name_hint"
android:layout_gravity="left|center_vertical"
android:textColor="@color/black"
android:background="@color/gray" />

<TextView
android:id="@+id/tv_group_name"
android:textSize="12sp"
android:layout_width="100dip"
android:layout_height="match_parent"
android:text="@string/group_name_hint"
android:layout_gravity="left|center_vertical"
android:textColor="@color/black"
android:background="@color/gray" />

</TableRow>

Expand Down
2 changes: 1 addition & 1 deletion res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<string name="restart_game">Are you sure you want to restart session?</string>
<string name="game_running">A Session is already running!</string>

<string name="server_ip">10.1.0.1</string>
<string name="server_ip">192.168.1.18</string> <!-- 10.1.0.1 -->
<string name="ip">IP</string>
<string name="not_saved">It was not possible to save the questions</string>
<string name="not_saved_because_file_name">It was not possible to save the question(s) because the file already exists. Please try a new filename</string>
Expand Down
Loading

0 comments on commit f11c088

Please sign in to comment.