Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed #680 At navigation drawer Report or bug & help item missing #681

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion app/src/main/java/io/neurolab/main/NeuroLab.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.hardware.usb.UsbManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.SystemClock;
import android.preference.PreferenceManager;
Expand Down Expand Up @@ -66,6 +67,10 @@ public class NeuroLab extends AppCompatActivity
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.READ_EXTERNAL_STORAGE
};
//
String url = "https://gitter.im/fossasia/neurolab?at=5dc84505fd6fe41fc05d87fa";
String url1 = "https://github.com/fossasia/neurolab-android/issues/new?assignees=&labels=Bug&template=bug.md&title=";
//
private static final int MY_REQUEST_CODE = 111;
private static final int PERMISSION_REQUEST_WRITE_EXTERNAL_STORAGE_RESULT = 1;
public static boolean developerMode = false;
Expand Down Expand Up @@ -364,7 +369,18 @@ public boolean onNavigationItemSelected(@NonNull MenuItem item) {
} else if (id == R.id.nav_connect_device) {
changeDeviceIcon();
startActivity(new Intent(this, DeviceInstructionsActivity.class));
} else if (id == R.id.nav_settings) {
}
//
else if (id == R.id.item_help) {
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(i);
}
else if (id == R.id.report_or_bug) {
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(url1));
startActivity(i);
}
//
else if (id == R.id.nav_settings) {
startActivity(new Intent(this, SettingsActivity.class));
} else if (id == R.id.nav_about_us) {
startActivity(new Intent(this, AboutUsActivity.class));
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_baseline_bug_report_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M20,8h-2.81c-0.45,-0.78 -1.07,-1.45 -1.82,-1.96L17,4.41 15.59,3l-2.17,2.17C12.96,5.06 12.49,5 12,5c-0.49,0 -0.96,0.06 -1.41,0.17L8.41,3 7,4.41l1.62,1.63C7.88,6.55 7.26,7.22 6.81,8L4,8v2h2.09c-0.05,0.33 -0.09,0.66 -0.09,1v1L4,12v2h2v1c0,0.34 0.04,0.67 0.09,1L4,16v2h2.81c1.04,1.79 2.97,3 5.19,3s4.15,-1.21 5.19,-3L20,18v-2h-2.09c0.05,-0.33 0.09,-0.66 0.09,-1v-1h2v-2h-2v-1c0,-0.34 -0.04,-0.67 -0.09,-1L20,10L20,8zM14,16h-4v-2h4v2zM14,12h-4v-2h4v2z"/>
</vector>
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_baseline_help_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,19h-2v-2h2v2zM15.07,11.25l-0.9,0.92C13.45,12.9 13,13.5 13,15h-2v-0.5c0,-1.1 0.45,-2.1 1.17,-2.83l1.24,-1.26c0.37,-0.36 0.59,-0.86 0.59,-1.41 0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2L8,9c0,-2.21 1.79,-4 4,-4s4,1.79 4,4c0,0.88 -0.36,1.68 -0.93,2.25z"/>
</vector>
11 changes: 10 additions & 1 deletion app/src/main/res/menu/activity_main_drawer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,16 @@
android:id="@+id/nav_about_us"
android:icon="@drawable/ic_info"
android:title="@string/about_us" />

<item
android:id="@+id/report_or_bug"
android:checked="false"
android:icon="@drawable/ic_baseline_bug_report_24"
android:title="@string/report_or_bug"/>
<item
android:id="@+id/item_help"
android:checked="false"
android:icon="@drawable/ic_baseline_help_24"
android:title="@string/help"/>
<item
android:id="@+id/nav_share"
android:icon="@drawable/ic_menu_share"
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<string name="num_channels_pref_label">Number Channels</string>
<string name="about_us">About Us</string>
<string name="last_session_head">Last Sessions</string>
<string name="help">Help</string>
<string name="report_or_bug">Report Or Bug</string>

<string name="settings">Settings</string>
<string name="simulation">Simulation</string>
Expand Down