Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Flattened hierarchy of mainentry #1933

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 33 additions & 42 deletions res/layout/mainentry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="6dip" >
android:paddingLeft="2dp" >

<ImageView
android:id="@+id/imgIcon"
Expand Down Expand Up @@ -71,54 +71,45 @@
android:src="?attr/icon_frozen" />
</LinearLayout>

<LinearLayout
<TextView
android:id="@+id/tvName"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="horizontal" >

<TextView
android:id="@+id/tvName"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:background="@drawable/list_item_pressed"
android:gravity="center_vertical"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:textAppearance="?android:attr/textAppearanceSmall"
tools:ignore="NestedWeights" />
android:background="@drawable/list_item_pressed"
android:gravity="center_vertical"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:textAppearance="?android:attr/textAppearanceSmall" />

<ImageView
android:id="@+id/imgSettings"
android:layout_width="24dip"
android:layout_height="24dip"
android:layout_gravity="center_vertical"
android:contentDescription="@string/help_application"
android:paddingLeft="3dip"
android:src="@android:drawable/btn_star_big_off"
android:visibility="gone" />
<ImageView
android:id="@+id/imgSettings"
android:layout_width="24dip"
android:layout_height="24dip"
android:layout_gravity="center_vertical"
android:contentDescription="@string/help_application"
android:paddingLeft="3dip"
android:src="@android:drawable/btn_star_big_off"
android:visibility="gone" />

<ImageView
android:id="@+id/imgCbRestricted"
android:layout_width="32dip"
android:layout_height="32dip"
android:layout_gravity="center_vertical"
android:layout_marginLeft="3dip"
android:layout_marginRight="3dip"
android:contentDescription="@string/title_restrict"
android:visibility="invisible" />
<ImageView
android:id="@+id/imgCbRestricted"
android:layout_width="32dip"
android:layout_height="32dip"
android:layout_gravity="center_vertical"
android:layout_marginLeft="3dip"
android:layout_marginRight="3dip"
android:contentDescription="@string/title_restrict"
android:visibility="invisible" />

<ProgressBar
android:id="@+id/pbRunning"
style="?android:attr/progressBarStyleInverse"
android:layout_width="32dip"
android:layout_height="32dip"
android:layout_gravity="center_vertical"
android:layout_marginLeft="3dip"
android:visibility="gone" />
</LinearLayout>
<ProgressBar
android:id="@+id/pbRunning"
style="?android:attr/progressBarStyleInverse"
android:layout_width="32dip"
android:layout_height="32dip"
android:layout_gravity="center_vertical"
android:layout_marginLeft="3dip"
android:visibility="gone" />

<ImageView
android:id="@+id/imgCbAsk"
Expand Down
2 changes: 1 addition & 1 deletion res/layout/mainlist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
android:layout_marginRight="@dimen/activity_horizontal_margin_list"
android:layout_marginTop="6dip"
android:choiceMode="none"
android:paddingRight="12dip"
android:paddingRight="6dp"
android:scrollbarStyle="insideInset" />

<ScrollView
Expand Down
2 changes: 1 addition & 1 deletion res/layout/restrictionlist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
android:layout_marginRight="@dimen/activity_horizontal_margin_list"
android:layout_marginTop="6dip"
android:choiceMode="none"
android:paddingRight="12dip"
android:paddingRight="6dp"
android:scrollbarStyle="insideInset" />

<ScrollView
Expand Down
2 changes: 1 addition & 1 deletion res/values-sw720dp-land/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
-->
<dimen name="activity_horizontal_margin">128dp</dimen>
<dimen name="activity_horizontal_margin_list">106dp</dimen>
<dimen name="activity_horizontal_margin_list">112dp</dimen>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

106 dip is Android default, why needs this to be changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reduction of the list's right padding affects all screen sizes, but graphical render for large screens was already good before the fix. Thus we need to counter-balance the right padding reduction for large screens.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like to keep the Android default.
This can never be a big deal om large screens.
The other margin fixes are applied now (unless I missed something) and it looks indeed nicer and makes a little bit more room for the application / restriction names.
Thanks for bringing this to my attention!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well...

large_bug

activity_horizontal_margin_list was already a custom implementation (compared with activity_horizontal_margin). Why not tune it up a bit if it fixes a graphical glitch?


</resources>