-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2.记住最后一次选择的解析源 3.支持手动输入视频网站
- Loading branch information
liyiwei
committed
Aug 29, 2018
1 parent
a48bc66
commit 93bab4b
Showing
10 changed files
with
173 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
app/src/main/java/group/tonight/vipvideohelper/other/PrefUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package group.tonight.vipvideohelper.other; | ||
|
||
import android.content.Context; | ||
import android.content.SharedPreferences; | ||
import android.preference.PreferenceManager; | ||
|
||
public class PrefUtils { | ||
public static final String KEY_LAST_SELECT_API_INDEX = "last_parse_index"; | ||
private static SharedPreferences INSTANCE; | ||
|
||
public static SharedPreferences init(Context context) { | ||
if (INSTANCE == null) { | ||
synchronized (PrefUtils.class) { | ||
if (INSTANCE == null) { | ||
INSTANCE = PreferenceManager.getDefaultSharedPreferences(context.getApplicationContext()); | ||
} | ||
} | ||
} | ||
return INSTANCE; | ||
} | ||
|
||
public static SharedPreferences get() { | ||
if (INSTANCE == null) { | ||
throw new NullPointerException("必须在Application的onCreate()中调用PrefUtils.init(this)"); | ||
} | ||
return INSTANCE; | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
app/src/main/java/group/tonight/vipvideohelper/other/WebViewHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package group.tonight.vipvideohelper.other; | ||
|
||
import android.webkit.WebChromeClient; | ||
import android.webkit.WebSettings; | ||
import android.webkit.WebView; | ||
|
||
public class WebViewHelper { | ||
private WebView mWebView; | ||
|
||
public WebViewHelper(WebView webView) { | ||
this.mWebView = webView; | ||
} | ||
|
||
public void setWebView() { | ||
WebSettings webSettings = mWebView.getSettings(); | ||
webSettings.setBuiltInZoomControls(true); | ||
webSettings.setUseWideViewPort(true); | ||
webSettings.setLoadWithOverviewMode(true); | ||
webSettings.setSavePassword(true); | ||
webSettings.setSaveFormData(true); | ||
webSettings.setJavaScriptEnabled(true); | ||
webSettings.setDomStorageEnabled(true); | ||
webSettings.setSupportMultipleWindows(true); | ||
webSettings.setPluginState(WebSettings.PluginState.ON);//设置webview支持插件 | ||
} | ||
|
||
public void setWebChromeClient() { | ||
mWebView.setWebChromeClient(new WebChromeClient()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!-- drawable/format-list-bulleted.xml --> | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:height="24dp" | ||
android:width="24dp" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<path android:fillColor="#fff" android:pathData="M7,5H21V7H7V5M7,13V11H21V13H7M4,4.5A1.5,1.5 0 0,1 5.5,6A1.5,1.5 0 0,1 4,7.5A1.5,1.5 0 0,1 2.5,6A1.5,1.5 0 0,1 4,4.5M4,10.5A1.5,1.5 0 0,1 5.5,12A1.5,1.5 0 0,1 4,13.5A1.5,1.5 0 0,1 2.5,12A1.5,1.5 0 0,1 4,10.5M7,19V17H21V19H7M4,16.5A1.5,1.5 0 0,1 5.5,18A1.5,1.5 0 0,1 4,19.5A1.5,1.5 0 0,1 2.5,18A1.5,1.5 0 0,1 4,16.5Z" /> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters