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
582a6e44
Commit
582a6e44
authored
Dec 23, 2017
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Donwload fonts through support library. #1515"
This reverts commit
6c89207e
.
parent
6c89207e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
19 deletions
+16
-19
mobile/src/main/AndroidManifest.xml
mobile/src/main/AndroidManifest.xml
+3
-0
mobile/src/main/java/com/github/shadowsocks/MainActivity.kt
mobile/src/main/java/com/github/shadowsocks/MainActivity.kt
+0
-9
mobile/src/main/res/font/iceland.xml
mobile/src/main/res/font/iceland.xml
+6
-10
mobile/src/main/res/layout/layout_header.xml
mobile/src/main/res/layout/layout_header.xml
+1
-0
mobile/src/main/res/values/preloaded_fonts.xml
mobile/src/main/res/values/preloaded_fonts.xml
+6
-0
No files found.
mobile/src/main/AndroidManifest.xml
View file @
582a6e44
...
@@ -34,6 +34,9 @@
...
@@ -34,6 +34,9 @@
android:value=
"@integer/google_play_services_version"
/>
android:value=
"@integer/google_play_services_version"
/>
<meta-data
android:name=
"com.google.android.backup.api_key"
<meta-data
android:name=
"com.google.android.backup.api_key"
android:value=
"AEdPqrEAAAAI_zVxZthz2HDuz9toTvkYvL0L5GA-OjeUIfBeXg"
/>
android:value=
"AEdPqrEAAAAI_zVxZthz2HDuz9toTvkYvL0L5GA-OjeUIfBeXg"
/>
<meta-data
android:name=
"preloaded_fonts"
android:resource=
"@array/preloaded_fonts"
/>
<activity
<activity
android:name=
".MainActivity"
android:name=
".MainActivity"
...
...
mobile/src/main/java/com/github/shadowsocks/MainActivity.kt
View file @
582a6e44
...
@@ -24,7 +24,6 @@ import android.app.Activity
...
@@ -24,7 +24,6 @@ import android.app.Activity
import
android.app.backup.BackupManager
import
android.app.backup.BackupManager
import
android.content.ActivityNotFoundException
import
android.content.ActivityNotFoundException
import
android.content.Intent
import
android.content.Intent
import
android.graphics.Typeface
import
android.net.Uri
import
android.net.Uri
import
android.net.VpnService
import
android.net.VpnService
import
android.nfc.NdefMessage
import
android.nfc.NdefMessage
...
@@ -34,7 +33,6 @@ import android.os.SystemClock
...
@@ -34,7 +33,6 @@ import android.os.SystemClock
import
android.support.customtabs.CustomTabsIntent
import
android.support.customtabs.CustomTabsIntent
import
android.support.design.widget.Snackbar
import
android.support.design.widget.Snackbar
import
android.support.v4.content.ContextCompat
import
android.support.v4.content.ContextCompat
import
android.support.v4.content.res.ResourcesCompat
import
android.support.v7.app.AlertDialog
import
android.support.v7.app.AlertDialog
import
android.support.v7.app.AppCompatActivity
import
android.support.v7.app.AppCompatActivity
import
android.support.v7.content.res.AppCompatResources
import
android.support.v7.content.res.AppCompatResources
...
@@ -215,7 +213,6 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe
...
@@ -215,7 +213,6 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
layout_main
)
setContentView
(
R
.
layout
.
layout_main
)
val
drawerBuilder
=
DrawerBuilder
()
val
drawerBuilder
=
DrawerBuilder
()
.
withActivity
(
this
)
.
withActivity
(
this
)
.
withTranslucentStatusBar
(
true
)
.
withTranslucentStatusBar
(
true
)
...
@@ -276,12 +273,6 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe
...
@@ -276,12 +273,6 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe
})
})
}
else
drawer
=
drawerBuilder
.
build
()
}
else
drawer
=
drawerBuilder
.
build
()
val
drawerTitle
=
drawer
.
getHeader
().
findViewById
<
TextView
>(
R
.
id
.
drawer_title
)
ResourcesCompat
.
getFont
(
this
,
R
.
font
.
iceland
,
object
:
ResourcesCompat
.
FontCallback
()
{
override
fun
onFontRetrievalFailed
(
reason
:
Int
)
{}
// Do nothing
override
fun
onFontRetrieved
(
typeface
:
Typeface
)
{
drawerTitle
.
setTypeface
(
typeface
)
}
},
null
)
if
(
savedInstanceState
==
null
)
displayFragment
(
ProfilesFragment
())
if
(
savedInstanceState
==
null
)
displayFragment
(
ProfilesFragment
())
previousSelectedDrawer
=
drawer
.
currentSelection
previousSelectedDrawer
=
drawer
.
currentSelection
statusText
=
findViewById
(
R
.
id
.
status
)
statusText
=
findViewById
(
R
.
id
.
status
)
...
...
mobile/src/main/res/font/iceland.xml
View file @
582a6e44
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<font-family
xmlns:android=
"http://schemas.android.com/apk/res/android"
<font-family
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
app:fontProviderAuthority=
"com.google.android.gms.fonts"
app:fontProviderAuthority=
"com.google.android.gms.fonts"
app:fontProviderPackage=
"com.google.android.gms"
app:fontProviderPackage=
"com.google.android.gms"
app:fontProviderQuery=
"Iceland"
app:fontProviderQuery=
"Iceland"
app:fontProviderCerts=
"@array/com_google_android_gms_fonts_certs"
>
app:fontProviderCerts=
"@array/com_google_android_gms_fonts_certs"
</font-family>
android:fontProviderAuthority=
"com.google.android.gms.fonts"
android:fontProviderPackage=
"com.google.android.gms"
android:fontProviderQuery=
"Iceland"
android:fontProviderCerts=
"@array/com_google_android_gms_fonts_certs"
/>
mobile/src/main/res/layout/layout_header.xml
View file @
582a6e44
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_centerVertical=
"true"
android:fontFamily=
"@font/iceland"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"shadowsocks"
android:text=
"shadowsocks"
android:textColor=
"@android:color/white"
android:textColor=
"@android:color/white"
...
...
mobile/src/main/res/values/preloaded_fonts.xml
0 → 100644
View file @
582a6e44
<?xml version="1.0" encoding="utf-8"?>
<resources>
<array
name=
"preloaded_fonts"
translatable=
"false"
>
<item>
@font/iceland
</item>
</array>
</resources>
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