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

feat: added developers section #613

Open
wants to merge 2 commits 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: 18 additions & 0 deletions app/src/main/java/io/neurolab/activities/AboutUsActivity.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.neurolab.activities;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
Expand Down Expand Up @@ -27,6 +29,7 @@ protected void onCreate(Bundle savedInstanceState) {
.addYoutube("UCQprMsG-raCIMlBudm20iLQ")
.addInstagram("fossasia")
.addGitHub("fossasia")
.addItem(addDevelopers())
.create();
FrameLayout frameLayout = new FrameLayout(this);
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
Expand All @@ -35,4 +38,19 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(frameLayout);
}

private Element addDevelopers() {
Element developersElement = new Element();
developersElement.setTitle(getString(R.string.developers));
developersElement.setIconDrawable(R.drawable.round_supervised_user_circle_24);
developersElement.setOnClickListener(v -> {
String url = getString(R.string.github_developers_link);
if (!url.startsWith("http://") && !url.startsWith("https://")) {
url = "https://" + url;
}
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(browserIntent);
});
return developersElement;
}

}
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/round_supervised_user_circle_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,2zM15.61,8.34c1.07,0 1.93,0.86 1.93,1.93s-0.86,1.93 -1.93,1.93 -1.93,-0.86 -1.93,-1.93c-0.01,-1.07 0.86,-1.93 1.93,-1.93zM9.61,6.76c1.3,0 2.36,1.06 2.36,2.36s-1.06,2.36 -2.36,2.36 -2.36,-1.06 -2.36,-2.36c0,-1.31 1.05,-2.36 2.36,-2.36zM9.61,15.89v3.75c-2.4,-0.75 -4.3,-2.6 -5.14,-4.96 1.05,-1.12 3.67,-1.69 5.14,-1.69 0.53,0 1.2,0.08 1.9,0.22 -1.64,0.87 -1.9,2.02 -1.9,2.68zM12,20c-0.27,0 -0.53,-0.01 -0.79,-0.04v-4.07c0,-1.42 2.94,-2.13 4.4,-2.13 1.07,0 2.92,0.39 3.84,1.15C18.28,17.88 15.39,20 12,20z"/>
</vector>
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 @@ -178,4 +178,6 @@ A difference to existing projects like OpenBCI is that it will not be necessary
<string name="enable">Enable</string>
<string name="received_data_display">received data display</string>
<string name="send">Send</string>
<string name="developers">Developers</string>
<string name="github_developers_link">https://github.com/fossasia/neurolab-android/graphs/contributors</string>
</resources>