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
eae97bc1
Commit
eae97bc1
authored
Dec 24, 2016
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the drawer header and icons
parent
91e5223a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
11 deletions
+51
-11
src/main/res/drawable/background_header.jpg
src/main/res/drawable/background_header.jpg
+0
-0
src/main/res/drawable/background_header.png
src/main/res/drawable/background_header.png
+0
-0
src/main/res/drawable/ic_copyright.xml
src/main/res/drawable/ic_copyright.xml
+9
-0
src/main/res/drawable/ic_folder.xml
src/main/res/drawable/ic_folder.xml
+9
-0
src/main/res/drawable/ic_settings.xml
src/main/res/drawable/ic_settings.xml
+9
-0
src/main/res/layout/layout_header.xml
src/main/res/layout/layout_header.xml
+20
-9
src/main/scala/com/github/shadowsocks/MainActivity.scala
src/main/scala/com/github/shadowsocks/MainActivity.scala
+4
-2
No files found.
src/main/res/drawable/background_header.jpg
0 → 100644
View file @
eae97bc1
58.8 KB
src/main/res/drawable/background_header.png
deleted
100644 → 0
View file @
91e5223a
132 KB
src/main/res/drawable/ic_copyright.xml
0 → 100644
View file @
eae97bc1
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M10.08,10.86c0.05,-0.33 0.16,-0.62 0.3,-0.87s0.34,-0.46 0.59,-0.62c0.24,-0.15 0.54,-0.22 0.91,-0.23 0.23,0.01 0.44,0.05 0.63,0.13 0.2,0.09 0.38,0.21 0.52,0.36s0.25,0.33 0.34,0.53 0.13,0.42 0.14,0.64h1.79c-0.02,-0.47 -0.11,-0.9 -0.28,-1.29s-0.4,-0.73 -0.7,-1.01 -0.66,-0.5 -1.08,-0.66 -0.88,-0.23 -1.39,-0.23c-0.65,0 -1.22,0.11 -1.7,0.34s-0.88,0.53 -1.2,0.92 -0.56,0.84 -0.71,1.36S8,11.29 8,11.87v0.27c0,0.58 0.08,1.12 0.23,1.64s0.39,0.97 0.71,1.35 0.72,0.69 1.2,0.91 1.05,0.34 1.7,0.34c0.47,0 0.91,-0.08 1.32,-0.23s0.77,-0.36 1.08,-0.63 0.56,-0.58 0.74,-0.94 0.29,-0.74 0.3,-1.15h-1.79c-0.01,0.21 -0.06,0.4 -0.15,0.58s-0.21,0.33 -0.36,0.46 -0.32,0.23 -0.52,0.3c-0.19,0.07 -0.39,0.09 -0.6,0.1 -0.36,-0.01 -0.66,-0.08 -0.89,-0.23 -0.25,-0.16 -0.45,-0.37 -0.59,-0.62s-0.25,-0.55 -0.3,-0.88 -0.08,-0.67 -0.08,-1v-0.27c0,-0.35 0.03,-0.68 0.08,-1.01zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"
/>
</vector>
src/main/res/drawable/ic_folder.xml
0 → 100644
View file @
eae97bc1
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M10,4H4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V8c0,-1.1 -0.9,-2 -2,-2h-8l-2,-2z"
/>
</vector>
src/main/res/drawable/ic_settings.xml
0 → 100644
View file @
eae97bc1
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M19.43,12.98c0.04,-0.32 0.07,-0.64 0.07,-0.98s-0.03,-0.66 -0.07,-0.98l2.11,-1.65c0.19,-0.15 0.24,-0.42 0.12,-0.64l-2,-3.46c-0.12,-0.22 -0.39,-0.3 -0.61,-0.22l-2.49,1c-0.52,-0.4 -1.08,-0.73 -1.69,-0.98l-0.38,-2.65C14.46,2.18 14.25,2 14,2h-4c-0.25,0 -0.46,0.18 -0.49,0.42l-0.38,2.65c-0.61,0.25 -1.17,0.59 -1.69,0.98l-2.49,-1c-0.23,-0.09 -0.49,0 -0.61,0.22l-2,3.46c-0.13,0.22 -0.07,0.49 0.12,0.64l2.11,1.65c-0.04,0.32 -0.07,0.65 -0.07,0.98s0.03,0.66 0.07,0.98l-2.11,1.65c-0.19,0.15 -0.24,0.42 -0.12,0.64l2,3.46c0.12,0.22 0.39,0.3 0.61,0.22l2.49,-1c0.52,0.4 1.08,0.73 1.69,0.98l0.38,2.65c0.03,0.24 0.24,0.42 0.49,0.42h4c0.25,0 0.46,-0.18 0.49,-0.42l0.38,-2.65c0.61,-0.25 1.17,-0.59 1.69,-0.98l2.49,1c0.23,0.09 0.49,0 0.61,-0.22l2,-3.46c0.12,-0.22 0.07,-0.49 -0.12,-0.64l-2.11,-1.65zM12,15.5c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5 3.5,1.57 3.5,3.5 -1.57,3.5 -3.5,3.5z"
/>
</vector>
src/main/res/layout/layout_header.xml
View file @
eae97bc1
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android=
"http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/drawer_title"
android:layout_width=
"wrap_content"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
<ImageView
android:layout_width=
"match_parent"
android:text=
"shadowsocks"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:orientation=
"vertical"
android:background=
"@drawable/background_header"
android:adjustViewBounds=
"true"
android:textSize=
"32sp"
android:scaleType=
"fitCenter"
android:textColor=
"@android:color/white"
/>
android:src=
"@drawable/background_header"
/>
<TextView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/drawer_title"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:text=
"shadowsocks"
android:gravity=
"center"
android:textSize=
"32sp"
android:textColor=
"@android:color/white"
/>
</RelativeLayout>
src/main/scala/com/github/shadowsocks/MainActivity.scala
View file @
eae97bc1
...
@@ -215,15 +215,17 @@ class MainActivity extends Activity with ServiceBoundContext with Drawer.OnDrawe
...
@@ -215,15 +215,17 @@ class MainActivity extends Activity with ServiceBoundContext with Drawer.OnDrawe
new
PrimaryDrawerItem
()
new
PrimaryDrawerItem
()
.
withIdentifier
(
DRAWER_PROFILES
)
.
withIdentifier
(
DRAWER_PROFILES
)
.
withName
(
R
.
string
.
profiles
)
.
withName
(
R
.
string
.
profiles
)
// TODO: withIcons
.
withIcon
(
getResources
.
getDrawable
(
R
.
drawable
.
ic_folder
))
)
)
.
addStickyDrawerItems
(
.
addStickyDrawerItems
(
new
SecondaryDrawerItem
()
new
SecondaryDrawerItem
()
.
withIdentifier
(
DRAWER_GLOBAL_SETTINGS
)
.
withIdentifier
(
DRAWER_GLOBAL_SETTINGS
)
.
withName
(
R
.
string
.
settings
),
.
withName
(
R
.
string
.
settings
)
.
withIcon
(
getResources
.
getDrawable
(
R
.
drawable
.
ic_settings
)),
new
SecondaryDrawerItem
()
new
SecondaryDrawerItem
()
.
withIdentifier
(
DRAWER_ABOUT
)
.
withIdentifier
(
DRAWER_ABOUT
)
.
withName
(
R
.
string
.
about
)
.
withName
(
R
.
string
.
about
)
.
withIcon
(
getResources
.
getDrawable
(
R
.
drawable
.
ic_copyright
))
.
withSelectable
(
false
)
.
withSelectable
(
false
)
)
)
.
withOnDrawerItemClickListener
(
this
)
.
withOnDrawerItemClickListener
(
this
)
...
...
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