Skip to content

Commit

Permalink
Pull some information out of issue/PR header.
Browse files Browse the repository at this point in the history
While this looks slightly less spectacular, adding the amount of
information previously present in the header view made it grow too large
in many cases, even on medium-sized screens.
  • Loading branch information
maniac103 committed May 21, 2015
1 parent dfd0f69 commit 17505e0
Show file tree
Hide file tree
Showing 8 changed files with 282 additions and 344 deletions.
118 changes: 0 additions & 118 deletions res/layout-land/issue_header.xml

This file was deleted.

178 changes: 178 additions & 0 deletions res/layout/issue_comment_list_header.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:paddingTop="@dimen/floating_action_button_margin_mini">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.gh4a.widget.FixedSizeImageView
android:id="@+id/iv_gravatar"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginRight="16dp" />

<com.gh4a.widget.StyleableTextView
android:id="@+id/tv_extra"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorPrimary"
android:textSize="16sp"
android:layout_toRightOf="@id/iv_gravatar" />

<com.gh4a.widget.StyleableTextView
android:id="@+id/tv_timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.VerySmall"
android:textColor="?android:attr/textColorSecondary"
android:layout_marginTop="2dp"
android:layout_toRightOf="@id/iv_gravatar"
android:layout_below="@id/tv_extra"/>

</RelativeLayout>

<com.gh4a.widget.StyleableTextView
android:id="@+id/tv_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/content_padding"
android:paddingBottom="@dimen/content_padding"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorPrimary" />

<RelativeLayout
android:id="@+id/milestone_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/overview_item_spacing"
android:visibility="gone">

<ImageView
android:id="@+id/iv_milestone"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginRight="10dp"
android:src="?attr/milestoneIcon" />

<com.gh4a.widget.StyleableTextView
android:id="@+id/tv_milestone_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/iv_milestone"
android:text="@string/issue_milestone_hint"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="?android:attr/textColorPrimary" />

<com.gh4a.widget.StyleableTextView
android:id="@+id/tv_milestone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_milestone_label"
android:layout_toRightOf="@id/iv_milestone"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />

</RelativeLayout>

<RelativeLayout
android:id="@+id/assignee_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/overview_item_spacing"
android:visibility="gone">

<ImageView
android:id="@+id/iv_assignee_icon"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginRight="10dp"
android:src="?attr/assigneeIcon" />

<com.gh4a.widget.StyleableTextView
android:id="@+id/tv_assignee_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/iv_assignee_icon"
android:text="@string/issue_assignee_hint"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="?android:attr/textColorPrimary" />

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_assignee_label"
android:layout_toRightOf="@id/iv_assignee_icon"
android:orientation="horizontal">

<ImageView
android:id="@+id/iv_assignee"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginRight="4dp"
android:layout_gravity="center_vertical" />

<com.gh4a.widget.StyleableTextView
android:id="@+id/tv_assignee"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />

</LinearLayout>

</RelativeLayout>

<RelativeLayout
android:id="@+id/label_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/overview_item_spacing"
android:visibility="gone">

<ImageView
android:id="@+id/iv_labels"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginRight="10dp"
android:src="?attr/labelsIcon" />

<com.gh4a.widget.StyleableTextView
android:id="@+id/tv_labels_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/iv_labels"
android:text="@string/issue_labels"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="?android:attr/textColorPrimary" />

<LinearLayout
android:id="@+id/ll_labels"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_below="@id/tv_labels_label"
android:layout_toRightOf="@id/iv_labels"
android:visibility="gone" />

</RelativeLayout>

<com.gh4a.widget.StyleableTextView
android:id="@+id/tv_pull"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/overview_item_spacing"
style="@style/SelectableLabel"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorLink"
android:text="@string/view_pull_request"
android:visibility="gone" />


</LinearLayout>
13 changes: 0 additions & 13 deletions res/layout/issue_description.xml

This file was deleted.

Loading

0 comments on commit 17505e0

Please sign in to comment.