Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
f5a8513b
Commit
f5a8513b
authored
Dec 08, 2017
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine padding in profile item
parent
97e93552
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
18 deletions
+17
-18
mobile/src/main/java/com/github/shadowsocks/ProfilesFragment.kt
.../src/main/java/com/github/shadowsocks/ProfilesFragment.kt
+4
-1
mobile/src/main/res/drawable/background_profile.xml
mobile/src/main/res/drawable/background_profile.xml
+1
-1
mobile/src/main/res/layout/layout_list.xml
mobile/src/main/res/layout/layout_list.xml
+1
-1
mobile/src/main/res/layout/layout_profile.xml
mobile/src/main/res/layout/layout_profile.xml
+10
-15
mobile/src/main/res/values/dimen.xml
mobile/src/main/res/values/dimen.xml
+1
-0
No files found.
mobile/src/main/java/com/github/shadowsocks/ProfilesFragment.kt
View file @
f5a8513b
...
@@ -174,10 +174,13 @@ class ProfilesFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener {
...
@@ -174,10 +174,13 @@ class ProfilesFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener {
val
params
=
val
params
=
LinearLayout
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
LinearLayout
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
params
.
gravity
=
Gravity
.
CENTER_HORIZONTAL
params
.
gravity
=
Gravity
.
CENTER_HORIZONTAL
adView
=
AdView
(
activity
)
val
context
=
context
!!
adView
=
AdView
(
context
)
adView
.
layoutParams
=
params
adView
.
layoutParams
=
params
adView
.
adUnitId
=
"ca-app-pub-9097031975646651/7760346322"
adView
.
adUnitId
=
"ca-app-pub-9097031975646651/7760346322"
adView
.
adSize
=
AdSize
.
FLUID
adView
.
adSize
=
AdSize
.
FLUID
val
padding
=
context
.
resources
.
getDimensionPixelOffset
(
R
.
dimen
.
profile_padding
)
adView
.
setPadding
(
padding
,
0
,
0
,
padding
)
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
content
).
addView
(
adView
)
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
content
).
addView
(
adView
)
...
...
mobile/src/main/res/drawable/background_profile.xml
View file @
f5a8513b
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
</item>
</item>
</selector>
</selector>
</item>
</item>
<item
android:left=
"
8dp
"
>
<item
android:left=
"
@dimen/profile_padding
"
>
<shape
android:shape=
"rectangle"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"@android:color/white"
/>
<solid
android:color=
"@android:color/white"
/>
</shape>
</shape>
...
...
mobile/src/main/res/layout/layout_list.xml
View file @
f5a8513b
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<include
layout=
"@layout/toolbar_light_dark"
/>
<include
layout=
"@layout/toolbar_light_dark"
/>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/list"
<android.support.v7.widget.RecyclerView
android:id=
"@+id/list"
tools:listitem=
"@
android:layout/simple_list_item_1
"
tools:listitem=
"@
layout/layout_profile
"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:layout_weight=
"1"
...
...
mobile/src/main/res/layout/layout_profile.xml
View file @
f5a8513b
...
@@ -12,10 +12,6 @@
...
@@ -12,10 +12,6 @@
android:nextFocusRight=
"@+id/edit"
android:nextFocusRight=
"@+id/edit"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<Space
android:layout_width=
"match_parent"
android:layout_height=
"8dp"
/>
<LinearLayout
<LinearLayout
android:id=
"@+id/container"
android:id=
"@+id/container"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -46,7 +42,7 @@
...
@@ -46,7 +42,7 @@
android:contentDescription=
"@string/share"
android:contentDescription=
"@string/share"
android:focusable=
"true"
android:focusable=
"true"
android:nextFocusLeft=
"@+id/container"
android:nextFocusLeft=
"@+id/container"
android:padding=
"
8
dp"
android:padding=
"
12
dp"
app:srcCompat=
"@drawable/ic_social_share"
/>
app:srcCompat=
"@drawable/ic_social_share"
/>
<android.support.v7.widget.AppCompatImageView
<android.support.v7.widget.AppCompatImageView
...
@@ -57,7 +53,7 @@
...
@@ -57,7 +53,7 @@
android:background=
"?attr/selectableItemBackgroundBorderless"
android:background=
"?attr/selectableItemBackgroundBorderless"
android:contentDescription=
"@string/edit"
android:contentDescription=
"@string/edit"
android:focusable=
"true"
android:focusable=
"true"
android:padding=
"
8
dp"
android:padding=
"
12
dp"
app:srcCompat=
"@drawable/ic_image_edit"
/>
app:srcCompat=
"@drawable/ic_image_edit"
/>
</LinearLayout>
</LinearLayout>
...
@@ -72,13 +68,14 @@
...
@@ -72,13 +68,14 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentStart=
"true"
android:layout_alignParentStart=
"true"
android:layout_marginEnd=
"8dp"
android:layout_marginBottom=
"@dimen/profile_padding"
android:layout_marginEnd=
"12dp"
android:layout_toStartOf=
"@+id/traffic"
android:layout_toStartOf=
"@+id/traffic"
android:ellipsize=
"end"
android:ellipsize=
"end"
android:maxLines=
"2"
android:maxLines=
"2"
tools:text=
"@string/profile_plugin"
android:textAppearance=
"?android:attr/textAppearanceSmall"
android:textAppearance=
"?android:attr/textAppearanceSmall"
android:textColor=
"?android:attr/textColorSecondary"
/>
android:textColor=
"?android:attr/textColorSecondary"
tools:text=
"@string/profile_plugin"
/>
<TextView
<TextView
android:id=
"@+id/traffic"
android:id=
"@+id/traffic"
...
@@ -86,13 +83,11 @@
...
@@ -86,13 +83,11 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentEnd=
"true"
android:layout_alignParentEnd=
"true"
android:layout_gravity=
"bottom"
android:layout_gravity=
"bottom"
android:layout_marginEnd=
"8dp"
android:layout_marginBottom=
"@dimen/profile_padding"
android:layout_marginEnd=
"12dp"
android:ellipsize=
"end"
android:ellipsize=
"end"
tools:text=
"@string/traffic"
android:textAppearance=
"?android:attr/textAppearanceSmall"
android:textAppearance=
"?android:attr/textAppearanceSmall"
android:textColor=
"?android:attr/textColorSecondary"
/>
android:textColor=
"?android:attr/textColorSecondary"
tools:text=
"@string/traffic"
/>
</RelativeLayout>
</RelativeLayout>
<Space
android:layout_width=
"match_parent"
android:layout_height=
"8dp"
/>
</LinearLayout>
</LinearLayout>
mobile/src/main/res/values/dimen.xml
View file @
f5a8513b
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<resources>
<resources>
<dimen
name=
"profile_item_max_width"
>
480dp
</dimen>
<dimen
name=
"profile_item_max_width"
>
480dp
</dimen>
<dimen
name=
"qr_code_size"
>
250dp
</dimen>
<dimen
name=
"qr_code_size"
>
250dp
</dimen>
<dimen
name=
"profile_padding"
>
8dp
</dimen>
<!-- TODO: Remove when this issue is fixed: https://github.com/JorgeCastilloPrz/FABProgressCircle/issues/19 -->
<!-- TODO: Remove when this issue is fixed: https://github.com/JorgeCastilloPrz/FABProgressCircle/issues/19 -->
<dimen
name=
"fab_margin_top"
>
-44dp
</dimen>
<dimen
name=
"fab_margin_top"
>
-44dp
</dimen>
</resources>
</resources>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment