File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
app/src/io/github/emanual/app Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 11package io .github .emanual .app .ui ;
22
33import io .github .emanual .app .R ;
4+ import io .github .emanual .app .utils .EManualUtils ;
45import android .annotation .SuppressLint ;
56import android .graphics .Bitmap ;
67import android .os .Bundle ;
@@ -43,6 +44,9 @@ public class Browser extends BaseActivity {
4344 @ Override protected void initData () {
4445 if (getIntent ().getStringExtra (EXTRA_URL ) != null ) {
4546 url = getIntent ().getStringExtra (EXTRA_URL );
47+ }else {
48+ url = EManualUtils .URL_HOME_PAGE ;
49+ toast ("无URL,跳转至主页.." );
4650 }
4751 }
4852
Original file line number Diff line number Diff line change 33import io .github .emanual .app .CoreService ;
44import io .github .emanual .app .R ;
55import io .github .emanual .app .ui .About ;
6+ import io .github .emanual .app .ui .Browser ;
67import io .github .emanual .app .ui .Feedback ;
78import io .github .emanual .app .utils .AndroidUtils ;
9+ import io .github .emanual .app .utils .EManualUtils ;
810import android .app .ProgressDialog ;
911import android .content .BroadcastReceiver ;
1012import android .content .Context ;
@@ -66,6 +68,12 @@ public class Explore extends BaseFragment {
6668 service .setAction (CoreService .Action_CheckVersion );
6769 getActivity ().startService (service );
6870 }
71+
72+ @ OnClick (R .id .btn_usage ) public void usage () {
73+ Intent intent = new Intent (getActivity (),Browser .class );
74+ intent .putExtra (Browser .EXTRA_URL , EManualUtils .URL_USAGE );
75+ startActivity (intent );
76+ }
6977
7078 @ Override public void onPause () {
7179 super .onPause ();
Original file line number Diff line number Diff line change 77 *
88 */
99public class EManualUtils {
10+ public static final String URL_HOME_PAGE = "http://www.iemanual.com" ;
11+ public static final String URL_USAGE = "http://iemanual.com/blog/?usage/index.md" ;
1012
1113 /**
1214 * 获得文件的扩展名
You can’t perform that action at this time.
0 commit comments