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
3f201eb2
Commit
3f201eb2
authored
Jun 09, 2016
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix connection test button too small
parent
71b1d5fe
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
7 deletions
+13
-7
src/main/res/drawable-v21/background_stat.xml
src/main/res/drawable-v21/background_stat.xml
+6
-0
src/main/res/drawable/background_stat.xml
src/main/res/drawable/background_stat.xml
+2
-0
src/main/res/layout-w400dp/layout_main_stat_title.xml
src/main/res/layout-w400dp/layout_main_stat_title.xml
+0
-1
src/main/res/layout/layout_main.xml
src/main/res/layout/layout_main.xml
+2
-2
src/main/res/layout/layout_main_stat_title.xml
src/main/res/layout/layout_main_stat_title.xml
+0
-1
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
+3
-3
No files found.
src/main/res/drawable-v21/background_stat.xml
0 → 100644
View file @
3f201eb2
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:color=
"?android:colorControlHighlight"
>
<item>
<color
android:color=
"@color/material_accent_300"
/>
</item>
</ripple>
src/main/res/drawable/background_stat.xml
0 → 100644
View file @
3f201eb2
<?xml version="1.0" encoding="utf-8"?>
<color
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:color=
"@color/material_accent_300"
/>
src/main/res/layout-w400dp/layout_main_stat_title.xml
View file @
3f201eb2
...
...
@@ -6,6 +6,5 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
/>
<TextView
android:id=
"@+id/connection_test"
android:gravity=
"end"
android:textSize=
"14sp"
android:textColor=
"?android:attr/textColorSecondary"
android:background=
"?attr/selectableItemBackgroundBorderless"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
/>
</LinearLayout>
src/main/res/layout/layout_main.xml
View file @
3f201eb2
...
...
@@ -10,10 +10,10 @@
<LinearLayout
android:id=
"@+id/stat"
android:elevation=
"4dp"
android:visibility=
"gone"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:minHeight=
"?android:attr/listPreferredItemHeight"
android:gravity=
"center_vertical"
android:paddingStart=
"16dip"
android:paddingEnd=
"88dip"
android:paddingStart=
"16dip"
android:paddingEnd=
"88dip"
android:focusable=
"true"
android:paddingLeft=
"16dip"
android:paddingRight=
"88dip"
android:paddingTop=
"16dip"
android:paddingBottom=
"16dip"
android:background=
"@
color/material_accent_300
"
android:orientation=
"vertical"
>
android:background=
"@
drawable/background_stat
"
android:orientation=
"vertical"
>
<include
layout=
"@layout/layout_main_stat_title"
/>
<android.support.v7.widget.GridLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:columnCount=
"4"
>
...
...
src/main/res/layout/layout_main_stat_title.xml
View file @
3f201eb2
...
...
@@ -6,6 +6,5 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<TextView
android:id=
"@+id/connection_test"
android:textSize=
"14sp"
android:textColor=
"?android:attr/textColorSecondary"
android:background=
"?attr/selectableItemBackgroundBorderless"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
View file @
3f201eb2
...
...
@@ -221,7 +221,7 @@ class Shadowsocks extends AppCompatActivity with ServiceBoundContext {
}
private
var
testCount
:
Int
=
_
private
lazy
val
stat
=
findViewById
(
R
.
id
.
stat
)
private
var
stat
:
View
=
_
private
var
connectionTestText
:
TextView
=
_
private
var
txText
:
TextView
=
_
private
var
rxText
:
TextView
=
_
...
...
@@ -370,13 +370,13 @@ class Shadowsocks extends AppCompatActivity with ServiceBoundContext {
val
tf
=
Typefaces
.
get
(
this
,
"fonts/Iceland.ttf"
)
if
(
tf
!=
null
)
title
.
setTypeface
(
tf
)
stat
=
findViewById
(
R
.
id
.
stat
)
connectionTestText
=
findViewById
(
R
.
id
.
connection_test
).
asInstanceOf
[
TextView
]
txText
=
findViewById
(
R
.
id
.
tx
).
asInstanceOf
[
TextView
]
txRateText
=
findViewById
(
R
.
id
.
txRate
).
asInstanceOf
[
TextView
]
rxText
=
findViewById
(
R
.
id
.
rx
).
asInstanceOf
[
TextView
]
rxRateText
=
findViewById
(
R
.
id
.
rxRate
).
asInstanceOf
[
TextView
]
connectionTestText
.
setFocusable
(
true
)
connectionTestText
.
setOnClickListener
(
_
=>
{
stat
.
setOnClickListener
(
_
=>
{
val
id
=
synchronized
{
testCount
+=
1
handler
.
post
(()
=>
connectionTestText
.
setText
(
R
.
string
.
connection_test_testing
))
...
...
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