Skip to content

Commit

Permalink
Styles added to milestone view
Browse files Browse the repository at this point in the history
  • Loading branch information
Motoaleks committed Dec 21, 2017
1 parent 3e97b5c commit cd188da
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 22 deletions.
47 changes: 25 additions & 22 deletions app/src/main/res/layout/repo_milestone_item.xml
Original file line number Diff line number Diff line change
@@ -1,52 +1,55 @@
<?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">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="10dp"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
android:paddingRight="?android:attr/listPreferredItemPaddingRight"
android:paddingStart="?android:attr/listPreferredItemPaddingEnd"
android:paddingTop="10dp">

<TextView
android:id="@+id/tv_milestone_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Milestone name" />
style="@style/TitleText" />

<TextView
android:id="@+id/tv_milestone_due_to"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="31.12.2017" />
style="@style/SubtitleText"
android:layout_marginBottom="8dp" />

<TextView
android:id="@+id/tv_milestone_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Lorem ipsum ............................................................................" />
style="@style/PlainText"
android:layout_marginBottom="4dp" />

<ProgressBar
android:id="@+id/pB_milestone_completion_progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:max="100"
android:progress="20" />
android:max="100" />

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

<TextView
android:id="@+id/tv_milestone_progress_percentage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="50" />
style="@style/SubtitleText"
android:layout_weight="0" />

<TextView
android:id="@+id/lbl_milestone_progress_percentage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="% completed" />
style="@style/SubtitleText"
android:layout_marginLeft="2dp"
android:layout_weight="0"
android:text="@string/ms_percent_completed" />
</LinearLayout>



</LinearLayout>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -355,5 +355,6 @@
<string name="ms_date_2_weeks">2 weeks</string>
<string name="ms_date_month">month</string>
<string name="ms_choose_date">Choose date</string>
<string name="ms_percent_completed">% completed</string>

</resources>
7 changes: 7 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@
<item name="android:layout_width">wrap_content</item>
</style>

<style name="PlainText">
<item name="android:textSize">14sp</item>
<item name="android:textColor">@color/text</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
</style>

<style name="ListSubtitleText" parent="SubtitleText"></style>

<style name="CodeText">
Expand Down

0 comments on commit cd188da

Please sign in to comment.