Skip to content

Commit

Permalink
v0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
shaharyakir committed Feb 23, 2014
1 parent 4b05106 commit 2200325
Show file tree
Hide file tree
Showing 17 changed files with 881 additions and 202 deletions.
7 changes: 6 additions & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
android:label="@string/app_name"
android:theme="@android:style/Theme.Holo.Light"
android:icon="@drawable/ic_launcher">

<activity android:name="com.facebook.LoginActivity"
android:label="@string/app_name" />

<activity android:name=".ItemList.ItemListActivity"
android:windowSoftInputMode="stateHidden"

android:windowSoftInputMode="adjustPan"
android:configChanges="keyboardHidden|orientation"
>
<intent-filter>
Expand All @@ -25,6 +27,9 @@
</intent-filter>
</activity>

<activity android:name=".ItemList.TestActivity">
</activity>

<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id"/>
</application>
</manifest>
5 changes: 5 additions & 0 deletions res/drawable/edit_button.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@android:color/holo_blue_dark"/> <!-- pressed -->
<item android:drawable="@android:color/holo_blue_light"/> <!-- default -->
</selector>
16 changes: 16 additions & 0 deletions res/layout/add_category_layout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">

<EditText
android:id="@+id/add_category_dialog_edittext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Category Title"
android:fontFamily="sans-serif-condensed"
/>

</LinearLayout>
9 changes: 4 additions & 5 deletions res/layout/header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@
<LinearLayout android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="#ff57baf3"

xmlns:android="http://schemas.android.com/apk/res/android">

<ImageView android:layout_width="32dp" android:layout_height="32dp" android:src="@drawable/ic_item"
android:visibility="gone"
/>
<TextView
<EditText
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/list_header_title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="2dip"
android:background="#ff57baf3"
android:enabled="false"
android:textColor="#FFFFFF"
android:paddingBottom="2dip"
android:paddingLeft="5dip"
Expand Down
192 changes: 133 additions & 59 deletions res/layout/item_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@

android:layout_width="fill_parent"
android:layout_height="wrap_content"

android:background="@drawable/list_item"
android:descendantFocusability="blocksDescendants"
>


Expand All @@ -19,12 +17,16 @@
android:id="@+id/list_item_back"
android:orientation="horizontal"
android:gravity="right"
android:visibility="invisible"
>

<Button android:layout_width="wrap_content"
android:layout_height="wrap_content"
<Button android:layout_width="@dimen/edit_button_width"
android:layout_height="match_parent"
android:textAlignment="center"
android:text="edit"
android:background="@drawable/edit_button"
android:text="Edit"
android:fontFamily="sans-serif-condensed"
android:textColor="@android:color/white"
android:id="@+id/item_list_activity_edit_item_button"
/>

Expand All @@ -35,103 +37,175 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/list_item_min_height"
android:padding="8dp"
android:orientation="vertical"
android:id="@+id/list_item_front"
android:background="@android:color/white"

>

<LinearLayout
android:id="@+id/item_list_activity_item_details_layout"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:id="@+id/item_list_activity_item_details_layout"
android:padding="8dp"
android:gravity="center_vertical"
android:orientation="vertical"
>
<LinearLayout

<TextView
android:id="@+id/quantity"
android:layout_width="wrap_content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@style/list_item_textView"
android:text="20"
android:layout_marginRight="4dp"
android:layout_gravity="center"/>

android:orientation="horizontal">

<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

style="@style/list_item_textView"
android:text="Burgers"
android:layout_gravity="center"
<TextView
android:id="@+id/quantity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/list_item_textView"
android:text="20"
android:layout_marginRight="4dp"
android:layout_gravity="center"/>

android:layout_weight="15"/>

<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

<FrameLayout
android:layout_width="32dp"
android:layout_height="32dp"
style="@style/list_item_textView"
android:text="Burgers"
android:layout_gravity="center"

>
android:layout_weight="15"/>

<ProgressBar
android:id="@+id/profilepic_progressbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>

<ImageView
android:id="@+id/profilepic"
<FrameLayout
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/ic_nobody"
android:focusable="false"
android:focusableInTouchMode="false"

/>
</FrameLayout>
</LinearLayout>
>

<ProgressBar
android:id="@+id/profilepic_progressbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>

<ImageView
android:id="@+id/profilepic"
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/com_facebook_profile_default_icon"
/>
</FrameLayout>
</LinearLayout>
<TextView
android:id="@+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="description"
android:fontFamily="sans-serif-condensed"
android:textColor="#ffbbbbbb"
/>
</LinearLayout>


<LinearLayout
android:id="@+id/item_list_activity_edit_item_layout"
android:layout_width="fill_parent"
android:layout_height="64dp"
android:visibility="gone"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp"
android:background="#f4f4f4"
>

<View
android:layout_height="1dp"
android:layout_width="fill_parent"
android:background="#f8f8f8"
android:layout_margin="8dp"
/>

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>

<TextView
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"

>

<EditText
android:id="@+id/item_list_activity_edit_item_quantity_edittext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number"
android:selectAllOnFocus="true"
android:text="1000"
android:hint="Qty."
android:imeOptions="actionNext"
android:fontFamily="sans-serif-condensed"
/>

</LinearLayout>

<EditText
android:id="@+id/item_list_activity_edit_item_title_edittext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Quantity:"
android:text="Sprite bottles"
android:imeOptions="actionNext"
android:fontFamily="sans-serif-condensed"
android:layout_weight="3"
/>

<EditText
android:id="@+id/item_list_activity_quantity_edit_text"
<Spinner
android:layout_width="wrap_content"
android:layout_height="32dp"
android:padding="2dp"
android:layout_marginRight="8dp"
android:layout_marginLeft="4dp"
android:textAlignment="center"
android:id="@+id/item_list_activity_edit_item_category_spinner"
/>

<ImageView
android:id="@+id/profilepic_edit"
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/com_facebook_profile_default_icon"
/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="4dp"
>

<EditText
android:id="@+id/item_list_activity_edit_item_description_edittext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="number"
android:background="#FFFFFF"
android:text="1000"
android:hint="Description"
android:fontFamily="sans-serif-condensed"
android:textColor="#ff44aaf3"
/>

</LinearLayout>

<TextView
android:layout_width="wrap_content"
android:layout_height="32dp"
android:text="Done"
android:id="@+id/item_list_activity_edit_item_done_editing_button"
android:layout_margin="4dp"
android:fontFamily="sans-serif-condensed"
android:background="@drawable/edit_button"
android:textColor="@android:color/white"
android:padding="4dp"
android:textSize="18sp"
android:textAlignment="center"
android:layout_marginBottom="0dp"
/>

</LinearLayout>

</LinearLayout>
Expand Down
45 changes: 44 additions & 1 deletion res/layout/item_list_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
android:capitalize="sentences"
android:background="@android:color/white"
android:imeOptions="actionDone"
android:fontFamily="sans-serif-condensed" android:clickable="true" android:singleLine="true"
android:fontFamily="sans-serif-condensed"
android:clickable="true"
android:singleLine="true"
android:layout_gravity="center_vertical"/>
<Button android:id="@+id/item_list_activity_add_item_button"
android:layout_width="wrap_content"
Expand All @@ -38,7 +40,47 @@

<View android:layout_width="match_parent" android:layout_height="2dp" android:background="#ebebeb"/>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="100"
>

<TextView
android:layout_width="0dp"
android:layout_height="32dp"
android:gravity="center"
android:layout_weight="33"
android:background="#ff5cc985"
android:textColor="@android:color/white"
android:id="@+id/filter_all_items_button"
android:text="All"
/>

<TextView
android:layout_width="0dp"
android:layout_height="32dp"
android:gravity="center"
android:layout_weight="33"
android:background="#ff58c07f"
android:textColor="@android:color/white"
android:text="Unregistered"
android:id="@+id/filter_unregistered_items_button"
/>

<TextView
android:layout_width="0dp"
android:layout_height="32dp"
android:gravity="center"
android:layout_weight="34"
android:background="#ff4fad72"
android:textColor="@android:color/white"
android:id="@+id/filter_my_items_button"
android:text="My"
/>

</LinearLayout>


<FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content"
Expand All @@ -47,6 +89,7 @@
<com.sashapps.WhoBringsWhat.ItemList.XListView android:id="@+id/list_item"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:descendantFocusability="afterDescendants"
/>

<ProgressBar
Expand Down
Loading

0 comments on commit 2200325

Please sign in to comment.