Skip to content

Commit

Permalink
Contributing to #36
Browse files Browse the repository at this point in the history
  • Loading branch information
dieechtenilente committed Nov 18, 2018
1 parent dc83fe8 commit fc22ef8
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 102 deletions.
21 changes: 13 additions & 8 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:orientation="vertical">

<LinearLayout
Expand Down Expand Up @@ -106,7 +106,7 @@

<view
class="android.support.v4.widget.Space"
android:layout_width="25dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textSize="18sp" />
Expand Down Expand Up @@ -149,32 +149,37 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:gravity="fill_horizontal"
android:orientation="horizontal"
android:weightSum="2.5">

<TextView
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="0.5"
android:gravity="center|start"
android:text="@string/consumed_drinks"
android:textSize="16sp" />

<Space
<View
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_weight="1" />

<ImageButton
android:id="@+id/refresh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="0dp"
android:layout_gravity="center|end"
android:layout_weight="1"
app:srcCompat="@android:drawable/ic_popup_sync" />

<Button
android:id="@+id/add_drink_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="0dp"
android:layout_gravity="center|end"
android:layout_weight="1"
android:text="@string/add_drink_button"
android:textSize="12sp" />

Expand Down
188 changes: 94 additions & 94 deletions app/src/main/res/layout/items_drink.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,111 +13,111 @@
android:contentDescription="@string/image"
app:srcCompat="@mipmap/beer" />

<LinearLayout
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:layout_height="wrap_content">

<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/no_information"
android:textSize="18sp" />
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">

<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/no_information"
android:textSize="18sp" />
</TableRow>

<TableLayout
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:gravity="center">

<TableRow
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingStart="20dp"
android:paddingEnd="20dp">

<TextView
android:id="@+id/alcoholLevel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/bacNoChar"
android:textAlignment="center"
android:textSize="18sp" />

<TextView
android:id="@+id/bac"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/no_information"
android:textAlignment="center"
android:textSize="18sp" />
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingStart="20dp"
android:paddingEnd="20dp">

<TextView
android:id="@+id/elap"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/time_ago"
android:textAlignment="center"
android:textSize="18sp" />

<TextView
android:id="@+id/takingTime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/no_information"
android:textAlignment="center"
android:textSize="18sp" />

</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center">
android:orientation="vertical"
android:paddingStart="20dp"
android:paddingEnd="20dp">

<LinearLayout
android:layout_width="wrap_content"
<TextView
android:id="@+id/left"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingEnd="20dp"
android:paddingStart="20dp">

<TextView
android:id="@+id/alcoholLevel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/bacNoChar"
android:textAlignment="center"
android:textSize="18sp" />

<TextView
android:id="@+id/bac"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/no_information"
android:textAlignment="center"
android:textSize="18sp" />
</LinearLayout>

<LinearLayout
android:gravity="center"
android:text="@string/time_left"
android:textAlignment="center"
android:textSize="18sp" />

<TextView
android:id="@+id/expireTime"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingEnd="20dp"
android:paddingStart="20dp">

<TextView
android:id="@+id/elap"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/time_ago"
android:textAlignment="center"
android:textSize="18sp" />

<TextView
android:id="@+id/takingTime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/no_information"
android:textAlignment="center"
android:textSize="18sp" />

</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingEnd="20dp"
android:paddingStart="20dp">

<TextView
android:id="@+id/left"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/time_left"
android:textAlignment="center"
android:textSize="18sp" />

<TextView
android:id="@+id/expireTime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/no_information"
android:textAlignment="center"
android:textSize="18sp" />
</LinearLayout>

</TableRow>
</TableLayout>
</LinearLayout>
android:gravity="center"
android:text="@string/no_information"
android:textAlignment="center"
android:textSize="18sp" />
</LinearLayout>

</TableRow>
</TableLayout>

<Space
android:layout_width="wrap_content"
Expand Down

0 comments on commit fc22ef8

Please sign in to comment.