mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
On click Methods added
This commit is contained in:
parent
0b15b6b296
commit
64271e6066
1 changed files with 28 additions and 0 deletions
|
|
@ -1,6 +1,9 @@
|
|||
package fr.free.nrw.commons;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import butterknife.BindView;
|
||||
|
|
@ -33,4 +36,29 @@ public class AboutActivity extends NavigationBaseActivity {
|
|||
versionText.setText(BuildConfig.VERSION_NAME);
|
||||
initDrawer();
|
||||
}
|
||||
|
||||
public void getOpenFacebookIntent(View view) {
|
||||
|
||||
Intent intent;
|
||||
try {
|
||||
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("fb://page/" + "1921335171459985"));
|
||||
intent.setPackage("com.facebook.katana");
|
||||
startActivity(intent);
|
||||
} catch (Exception e) {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/" + "1921335171459985")));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void getOpenGithubIntent(View view) {
|
||||
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/commons-app/apps-android-commons\\"));
|
||||
startActivity(browserIntent);
|
||||
}
|
||||
|
||||
public void getOpenWebsiteIntent(View view) {
|
||||
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://commons-app.github.io/\\"));
|
||||
startActivity(browserIntent);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue