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
da8a6599
Commit
da8a6599
authored
Dec 28, 2016
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix another naming conflict in @+id/content
parent
b069b3e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/main/res/layout/layout_main.xml
src/main/res/layout/layout_main.xml
+1
-1
src/main/scala/com/github/shadowsocks/MainActivity.scala
src/main/scala/com/github/shadowsocks/MainActivity.scala
+2
-2
No files found.
src/main/res/layout/layout_main.xml
View file @
da8a6599
...
...
@@ -3,7 +3,7 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:ignore=
"UnknownIdInLayout"
android:clipChildren=
"false"
>
<
android.support.design.widget.CoordinatorLayout
android:id=
"@+id/content
"
<
FrameLayout
android:id=
"@+id/fragment_holder
"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_above=
"@+id/stat"
/>
...
...
src/main/scala/com/github/shadowsocks/MainActivity.scala
View file @
da8a6599
...
...
@@ -146,7 +146,7 @@ class MainActivity extends Activity with ServiceBoundContext with Drawer.OnDrawe
rxText
.
setText
(
TrafficMonitor
.
formatTraffic
(
rxTotal
))
txRateText
.
setText
(
TrafficMonitor
.
formatTraffic
(
txRate
)
+
"/s"
)
rxRateText
.
setText
(
TrafficMonitor
.
formatTraffic
(
rxRate
)
+
"/s"
)
val
child
=
getFragmentManager
.
findFragmentById
(
R
.
id
.
content
).
asInstanceOf
[
ToolbarFragment
]
val
child
=
getFragmentManager
.
findFragmentById
(
R
.
id
.
fragment_holder
).
asInstanceOf
[
ToolbarFragment
]
if
(
child
!=
null
)
child
.
onTrafficUpdated
(
txRate
,
rxRate
,
txTotal
,
rxTotal
)
}
...
...
@@ -337,7 +337,7 @@ class MainActivity extends Activity with ServiceBoundContext with Drawer.OnDrawe
private
def
displayFragment
(
fragment
:
ToolbarFragment
)
{
currentFragment
=
fragment
getFragmentManager
.
beginTransaction
().
replace
(
R
.
id
.
content
,
fragment
).
commitAllowingStateLoss
()
getFragmentManager
.
beginTransaction
().
replace
(
R
.
id
.
fragment_holder
,
fragment
).
commitAllowingStateLoss
()
drawer
.
closeDrawer
()
}
...
...
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