Skip to content

Commit

Permalink
[#4] 'Preview iqsets' button is coming... yay! \o/
Browse files Browse the repository at this point in the history
  • Loading branch information
chrqls committed Dec 27, 2013
1 parent 76b6e20 commit faf2982
Show file tree
Hide file tree
Showing 11 changed files with 414 additions and 74 deletions.
60 changes: 60 additions & 0 deletions res/layout-large-land/iqset_details.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/container"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/rounded_border"
android:layout_gravity="center"
android:layout_marginLeft="200dip"
android:layout_marginRight="200dip"
android:layout_marginTop="100dip"
android:layout_marginBottom="100dip">

<ImageButton
android:id="@+id/bt_close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_close"
android:contentDescription="@string/close_dialog"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp" />

<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/iqset_uppercase"
android:textStyle="bold"
android:textSize="16sp"
android:textColor="@color/black"
android:layout_marginTop="30dip"
android:layout_centerHorizontal="true" />

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

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


</RelativeLayout>
83 changes: 83 additions & 0 deletions res/layout-large-land/preview_iqset_item.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<TableLayout
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:background="@color/white"
android:layout_height="fill_parent"
android:layout_width="fill_parent" >

<TableRow
android:id="@+id/tr"
android:layout_width="0dip"
android:layout_height="wrap_content">

<TextView
android:id="@+id/tv_question"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/question"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:layout_marginTop="10dip"
android:textSize="16sp"
android:textColor="@color/black" />
</TableRow>

<TableLayout
android:orientation="horizontal"
android:background="@color/white"
android:layout_height="match_parent"
android:layout_width="fill_parent" >

<TableRow
android:id="@+id/col1"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >

<TextView
android:id="@+id/tv_alternative1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/alternative1"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:layout_marginTop="5dip"
android:textSize="12sp"
android:textColor="@color/blue" />

<TextView
android:id="@+id/tv_alternative2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/alternative2"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:layout_marginTop="5dip"
android:textSize="12sp"
android:textColor="@color/blue" />

<TextView
android:id="@+id/tv_alternative3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/alternative3"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:layout_marginTop="5dip"
android:textSize="12sp"
android:textColor="@color/blue" />

<TextView
android:id="@+id/tv_alternative4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/alternative4"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:layout_marginTop="5dip"
android:textSize="12sp"
android:textColor="@color/blue" />
</TableRow>
</TableLayout>
</TableLayout>
1 change: 0 additions & 1 deletion res/layout-large-land/questions_item.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<org.smilec.smile.ui.widget.checkbox.CheckableRelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:marvinlabs="http://schemas.android.com/apk/res/fr.marvinlabs.selectablelisttutorial"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:shrinkColumns="*"
Expand Down
14 changes: 12 additions & 2 deletions res/layout-large-land/use_prepared_questions_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,17 @@
android:button="@drawable/checkbox"
android:focusable="false"
android:layout_marginLeft="20dip"
android:layout_marginRight="5dip"
android:layout_gravity="left|center_vertical" />

<ImageView
android:id="@+id/iv_details"
android:src="@drawable/details"
android:background="@color/gray"
android:layout_marginBottom="3dip"
android:layout_marginRight="25dip"
android:layout_marginTop="3dip"/>

<TextView
android:text="@string/brackets_open"
android:textSize="12sp"
Expand All @@ -31,15 +40,15 @@
android:text="@string/size_hint"
android:textStyle="bold"
android:layout_gravity="center_vertical"
android:textColor="@color/blue" />
android:textColor="@color/pink" />

<TextView
android:text="@string/brackets_close"
android:textSize="12sp"
android:textColor="@color/black"
android:focusable="false"
android:layout_gravity="left|center_vertical"/>

<TextView
android:textSize="12sp"
android:text="@string/separator"
Expand Down Expand Up @@ -78,6 +87,7 @@
android:layout_gravity="center_vertical"
android:layout_marginLeft="1dip"
android:layout_marginRight="3dip"
android:background="@color/gray"
android:textColor="@color/black" />

<TextView
Expand Down
1 change: 1 addition & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
<string name="answers">Complete</string>
<string name="question">Question</string>
<string name="question_uppercase">QUESTION</string>
<string name="iqset_uppercase">IQSET</string>
<string name="student">Students</string>


Expand Down
9 changes: 9 additions & 0 deletions src/main/java/org/smilec/smile/domain/IQSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Date;
import java.util.Locale;

Expand All @@ -15,6 +16,7 @@ public class IQSet {
private String sessionTitle;
private String teacherName;
private String groupName;
private Collection<Question> questions;

public IQSet() { }

Expand Down Expand Up @@ -80,4 +82,11 @@ public String getGroupName() {
public void setGroupName(String groupName) {
this.groupName = groupName;
}

public Collection<Question> getQuestions() {
return questions;
}
public void setQuestions(Collection<Question> questions) {
this.questions = questions;
}
}
Loading

0 comments on commit faf2982

Please sign in to comment.