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
cc9fa4c4
Commit
cc9fa4c4
authored
Apr 30, 2015
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refine the drawer indicator
parent
9041404f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
+12
-6
No files found.
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
View file @
cc9fa4c4
...
@@ -495,10 +495,16 @@ class Shadowsocks
...
@@ -495,10 +495,16 @@ class Shadowsocks
menuAdapter
.
setListener
(
this
)
menuAdapter
.
setListener
(
this
)
listView
.
setAdapter
(
menuAdapter
)
listView
.
setAdapter
(
menuAdapter
)
drawer
.
setMenuView
(
listView
)
drawer
.
setMenuView
(
listView
)
// The drawable that replaces the up indicator in the action bar
drawer
.
setSlideDrawable
(
R
.
drawable
.
ic_drawer
)
if
(
Utils
.
isLollipopOrAbove
)
{
// Whether the previous drawable should be shown
drawer
.
setDrawerIndicatorEnabled
(
false
)
drawer
.
setDrawerIndicatorEnabled
(
true
)
}
else
{
// The drawable that replaces the up indicator in the action bar
drawer
.
setSlideDrawable
(
R
.
drawable
.
ic_drawer
)
// Whether the previous drawable should be shown
drawer
.
setDrawerIndicatorEnabled
(
true
)
}
if
(!
isSinglePane
)
{
if
(!
isSinglePane
)
{
drawer
.
openMenu
(
false
)
drawer
.
openMenu
(
false
)
}
}
...
@@ -518,7 +524,7 @@ class Shadowsocks
...
@@ -518,7 +524,7 @@ class Shadowsocks
getWindow
.
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
);
getWindow
.
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
);
getWindow
.
setStatusBarColor
(
getResources
().
getColor
(
R
.
color
.
grey3
));
getWindow
.
setStatusBarColor
(
getResources
().
getColor
(
R
.
color
.
grey3
));
getActionBar
.
setDisplayHomeAsUpEnabled
(
true
)
getActionBar
.
setDisplayHomeAsUpEnabled
(
true
)
getActionBar
.
set
DisplayShowHomeEnabled
(
false
)
getActionBar
.
set
HomeAsUpIndicator
(
R
.
drawable
.
ic_drawer
)
}
else
{
}
else
{
getActionBar
.
setIcon
(
R
.
drawable
.
ic_stat_shadowsocks
)
getActionBar
.
setIcon
(
R
.
drawable
.
ic_stat_shadowsocks
)
}
}
...
@@ -916,13 +922,13 @@ class Shadowsocks
...
@@ -916,13 +922,13 @@ class Shadowsocks
private
def
showQrCode
()
{
private
def
showQrCode
()
{
val
image
=
new
ImageView
(
this
)
val
image
=
new
ImageView
(
this
)
image
.
setPadding
(
0
,
dp2px
(
20
),
0
,
dp2px
(
20
))
image
.
setLayoutParams
(
new
LinearLayout
.
LayoutParams
(-
1
,
-
1
))
image
.
setLayoutParams
(
new
LinearLayout
.
LayoutParams
(-
1
,
-
1
))
val
qrcode
=
QRCode
.
from
(
Parser
.
generate
(
currentProfile
))
val
qrcode
=
QRCode
.
from
(
Parser
.
generate
(
currentProfile
))
.
withSize
(
dp2px
(
250
),
dp2px
(
250
)).
asInstanceOf
[
QRCode
]
.
withSize
(
dp2px
(
250
),
dp2px
(
250
)).
asInstanceOf
[
QRCode
]
image
.
setImageBitmap
(
qrcode
.
bitmap
())
image
.
setImageBitmap
(
qrcode
.
bitmap
())
new
AlertDialog
.
Builder
(
this
)
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
getString
(
R
.
string
.
qrcode
))
.
setCancelable
(
true
)
.
setCancelable
(
true
)
.
setNegativeButton
(
getString
(
R
.
string
.
close
),
new
DialogInterface
.
OnClickListener
()
{
.
setNegativeButton
(
getString
(
R
.
string
.
close
),
new
DialogInterface
.
OnClickListener
()
{
override
def
onClick
(
dialog
:
DialogInterface
,
id
:
Int
)
{
override
def
onClick
(
dialog
:
DialogInterface
,
id
:
Int
)
{
...
...
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