mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Used @OnClick Annotation
This commit is contained in:
parent
ca43dbcef1
commit
9985e87b8a
2 changed files with 7 additions and 3 deletions
|
|
@ -8,6 +8,7 @@ import android.widget.TextView;
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
|
import butterknife.OnClick;
|
||||||
import fr.free.nrw.commons.theme.NavigationBaseActivity;
|
import fr.free.nrw.commons.theme.NavigationBaseActivity;
|
||||||
import fr.free.nrw.commons.ui.widget.HtmlTextView;
|
import fr.free.nrw.commons.ui.widget.HtmlTextView;
|
||||||
|
|
||||||
|
|
@ -37,6 +38,7 @@ public class AboutActivity extends NavigationBaseActivity {
|
||||||
initDrawer();
|
initDrawer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OnClick(R.id.facebook_launch_icon)
|
||||||
public void launchFacebook(View view) {
|
public void launchFacebook(View view) {
|
||||||
|
|
||||||
Intent intent;
|
Intent intent;
|
||||||
|
|
@ -50,12 +52,14 @@ public class AboutActivity extends NavigationBaseActivity {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OnClick(R.id.github_launch_icon)
|
||||||
public void launchGithub(View view) {
|
public void launchGithub(View view) {
|
||||||
|
|
||||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/commons-app/apps-android-commons\\"));
|
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/commons-app/apps-android-commons\\"));
|
||||||
startActivity(browserIntent);
|
startActivity(browserIntent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OnClick(R.id.website_launch_icon)
|
||||||
public void launchWebsite(View view) {
|
public void launchWebsite(View view) {
|
||||||
|
|
||||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://commons-app.github.io/\\"));
|
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://commons-app.github.io/\\"));
|
||||||
|
|
|
||||||
|
|
@ -76,30 +76,30 @@
|
||||||
>
|
>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/website_launch_icon"
|
||||||
android:layout_width="@dimen/overflow_icon_dimen"
|
android:layout_width="@dimen/overflow_icon_dimen"
|
||||||
android:layout_height="@dimen/overflow_icon_dimen"
|
android:layout_height="@dimen/overflow_icon_dimen"
|
||||||
android:src="@drawable/ic_action_globe"
|
android:src="@drawable/ic_action_globe"
|
||||||
android:contentDescription= "@string/commons_website"
|
android:contentDescription= "@string/commons_website"
|
||||||
android:layout_margin="@dimen/activity_margin_horizontal"
|
android:layout_margin="@dimen/activity_margin_horizontal"
|
||||||
android:onClick="getOpenWebsiteIntent"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/facebook_launch_icon"
|
||||||
android:layout_width="@dimen/overflow_icon_dimen"
|
android:layout_width="@dimen/overflow_icon_dimen"
|
||||||
android:layout_height="@dimen/overflow_icon_dimen"
|
android:layout_height="@dimen/overflow_icon_dimen"
|
||||||
android:src="@drawable/ic_action_facebook"
|
android:src="@drawable/ic_action_facebook"
|
||||||
android:contentDescription= "@string/commons_facebook"
|
android:contentDescription= "@string/commons_facebook"
|
||||||
android:layout_margin="@dimen/activity_margin_horizontal"
|
android:layout_margin="@dimen/activity_margin_horizontal"
|
||||||
android:onClick="getOpenFacebookIntent"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/github_launch_icon"
|
||||||
android:layout_width="@dimen/overflow_icon_dimen"
|
android:layout_width="@dimen/overflow_icon_dimen"
|
||||||
android:layout_height="@dimen/overflow_icon_dimen"
|
android:layout_height="@dimen/overflow_icon_dimen"
|
||||||
android:src="@drawable/ic_action_github"
|
android:src="@drawable/ic_action_github"
|
||||||
android:contentDescription= "@string/commons_github"
|
android:contentDescription= "@string/commons_github"
|
||||||
android:layout_margin="@dimen/activity_margin_horizontal"
|
android:layout_margin="@dimen/activity_margin_horizontal"
|
||||||
android:onClick="getOpenGithubIntent"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue