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