Skip to content

Commit

Permalink
添加GitHub地址
Browse files Browse the repository at this point in the history
  • Loading branch information
SplashCodes committed Aug 10, 2016
1 parent 38a6e8d commit 45dc6fb
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.design.widget.AppBarLayout;
Expand Down Expand Up @@ -218,6 +219,12 @@ public boolean onNavigationItemSelected(MenuItem item) {
setFragment(id);
}

if (id == R.id.nav_github) {
Uri uri = Uri.parse("https://github.com/SplashCodes/JAViewer/releases");
Intent it = new Intent(Intent.ACTION_VIEW, uri);
startActivity(it);
}

DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
Expand Down
44 changes: 44 additions & 0 deletions app/src/main/res/drawable/ic_menu_github.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="120dp"
android:height="120dp"
android:viewportWidth="120"
android:viewportHeight="120">

<path
android:fillColor="#000000"
android:pathData="M60.1,1.4C27,1.4,0.2,28.2,0.2,61.3c0,26.5,17.2,48.9,41,56.8c3,0.6,4.1-1.3,4.1-2.9
c0-1.4-0.1-6.1-0.1-11.2C28.5,107.7,25,97.1,25,97.1c-2.7-6.9-6.6-8.8-6.6-8.8c-5.4-3.7,0.4-3.6,0.4-3.6c6,0.4,9.2,6.2,9.2,6.2
c5.3,9.2,14,6.5,17.4,5c0.5-3.9,2.1-6.5,3.8-8c-13.3-1.5-27.3-6.6-27.3-29.6c0-6.5,2.3-11.9,6.2-16.1c-0.6-1.5-2.7-7.6,0.6-15.8
c0,0,5-1.6,16.5,6.1c4.8-1.3,9.9-2,15-2c5.1,0,10.2,0.7,15,2c11.4-7.7,16.5-6.1,16.5-6.1c3.3,8.2,1.2,14.3,0.6,15.8
c3.8,4.2,6.2,9.5,6.2,16.1c0,23-14,28.1-27.3,29.6c2.1,1.9,4.1,5.5,4.1,11.1c0,8-0.1,14.5-0.1,16.4c0,1.6,1.1,3.5,4.1,2.9
c23.8-7.9,40.9-30.4,40.9-56.8C120,28.2,93.2,1.4,60.1,1.4z" />
<path
android:fillColor="#000000"
android:pathData="M22.9,87.4c-0.1,0.3-0.6,0.4-1,0.2c-0.4-0.2-0.7-0.6-0.5-0.9c0.1-0.3,0.6-0.4,1-0.2
C22.8,86.7,23.1,87.1,22.9,87.4L22.9,87.4z M22.2,86.9" />
<path
android:fillColor="#000000"
android:pathData="M25.3,90.1c-0.3,0.3-0.8,0.1-1.2-0.3c-0.4-0.4-0.5-1-0.2-1.2c0.3-0.3,0.8-0.1,1.2,0.3
C25.6,89.3,25.6,89.9,25.3,90.1L25.3,90.1z M24.8,89.5" />
<path
android:fillColor="#000000"
android:pathData="M27.7,93.6c-0.4,0.3-1,0-1.3-0.5c-0.4-0.5-0.4-1.2,0-1.4c0.4-0.3,1,0,1.3,0.5C28.1,92.7,28.1,93.3,27.7,93.6
L27.7,93.6z M27.7,93.6" />
<path
android:fillColor="#000000"
android:pathData="M30.9,96.9c-0.3,0.4-1,0.3-1.5-0.2c-0.5-0.5-0.7-1.2-0.3-1.5c0.3-0.4,1-0.3,1.6,0.2
C31.1,95.9,31.3,96.5,30.9,96.9L30.9,96.9z M30.9,96.9" />
<path
android:fillColor="#000000"
android:pathData="M35.4,98.8c-0.1,0.5-0.8,0.7-1.5,0.5c-0.7-0.2-1.1-0.8-1-1.2c0.1-0.5,0.8-0.7,1.5-0.5
C35.1,97.8,35.5,98.4,35.4,98.8L35.4,98.8z M35.4,98.8" />
<path
android:fillColor="#000000"
android:pathData="M40.3,99.2c0,0.5-0.6,0.9-1.3,0.9c-0.7,0-1.3-0.4-1.3-0.9c0-0.5,0.6-0.9,1.3-0.9
C39.7,98.3,40.3,98.7,40.3,99.2L40.3,99.2z M40.3,99.2" />
<path
android:fillColor="#000000"
android:pathData="M44.9,98.4c0.1,0.5-0.4,1-1.1,1.1c-0.7,0.1-1.3-0.2-1.4-0.6c-0.1-0.5,0.4-1,1.1-1.1
C44.1,97.6,44.8,97.9,44.9,98.4L44.9,98.4z M44.9,98.4" />
</vector>
10 changes: 10 additions & 0 deletions app/src/main/res/menu/activity_main_drawer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,14 @@
android:title="类别" />
</group>

<group
android:id="@+id/nav_group3"
android:checkableBehavior="single">
<item
android:id="@+id/nav_github"
android:icon="@drawable/ic_menu_github"
android:title="GitHub" />
</group>


</menu>

0 comments on commit 45dc6fb

Please sign in to comment.