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
e13a4cc8
Unverified
Commit
e13a4cc8
authored
Dec 07, 2018
by
Max Lv
Committed by
GitHub
Dec 07, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1990 from Mygod/fix-bab
Fix bottom app bar
parents
e2662ce9
343ecac8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
mobile/src/main/java/com/github/shadowsocks/MainActivity.kt
mobile/src/main/java/com/github/shadowsocks/MainActivity.kt
+1
-5
plugin/build.gradle
plugin/build.gradle
+2
-2
No files found.
mobile/src/main/java/com/github/shadowsocks/MainActivity.kt
View file @
e13a4cc8
...
...
@@ -39,7 +39,6 @@ import androidx.coordinatorlayout.widget.CoordinatorLayout
import
androidx.core.content.ContextCompat
import
androidx.core.net.toUri
import
androidx.core.view.GravityCompat
import
androidx.core.view.updateLayoutParams
import
androidx.drawerlayout.widget.DrawerLayout
import
androidx.preference.PreferenceDataStore
import
com.crashlytics.android.Crashlytics
...
...
@@ -57,7 +56,6 @@ import com.github.shadowsocks.widget.ServiceButton
import
com.github.shadowsocks.widget.StatsBar
import
com.google.android.material.navigation.NavigationView
import
com.google.android.material.snackbar.Snackbar
import
kotlin.math.roundToInt
class
MainActivity
:
AppCompatActivity
(),
ShadowsocksConnection
.
Interface
,
OnPreferenceDataStoreChangeListener
,
NavigationView
.
OnNavigationItemSelectedListener
{
...
...
@@ -76,9 +74,7 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, OnPre
val
snackbar
by
lazy
{
findViewById
<
CoordinatorLayout
>(
R
.
id
.
snackbar
)
}
fun
snackbar
(
text
:
CharSequence
=
""
)
=
Snackbar
.
make
(
snackbar
,
text
,
Snackbar
.
LENGTH_LONG
).
apply
{
view
.
updateLayoutParams
<
CoordinatorLayout
.
LayoutParams
>
{
bottomMargin
+=
snackbar
.
measuredHeight
-
fab
.
top
-
fab
.
translationY
.
roundToInt
()
}
view
.
translationY
+=
fab
.
top
+
fab
.
translationY
-
snackbar
.
measuredHeight
}
private
val
customTabsIntent
by
lazy
{
...
...
plugin/build.gradle
View file @
e13a4cc8
...
...
@@ -24,8 +24,8 @@ android {
}
dependencies
{
api
"androidx.core:core-ktx:
1.0.1
"
api
"com.google.android.material:material:1.
0.0
"
api
"androidx.core:core-ktx:
$androidxVersion
"
api
"com.google.android.material:material:1.
1.0-alpha01
"
api
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
testImplementation
"junit:junit:$junitVersion"
androidTestImplementation
"androidx.test:runner:$androidTestVersion"
...
...
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