diff --git a/app/src/main/java/org/fdroid/fdroid/views/AppDetailsActivity.java b/app/src/main/java/org/fdroid/fdroid/views/AppDetailsActivity.java index 9ed41a625..98a09fb57 100644 --- a/app/src/main/java/org/fdroid/fdroid/views/AppDetailsActivity.java +++ b/app/src/main/java/org/fdroid/fdroid/views/AppDetailsActivity.java @@ -257,7 +257,12 @@ public class AppDetailsActivity extends AppCompatActivity @Override public boolean onOptionsItemSelected(MenuItem item) { - if (item.getItemId() == R.id.action_share) { + if (item.getItemId() == R.id.action_forum) { + Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://gitlab.com/fdroid/fdroiddata/commits/master/metadata?search=" + +app.name.replaceAll(" ","%20"))); + startActivity(browserIntent); + return true; + } else if (item.getItemId() == R.id.action_share) { Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.setType("text/plain"); shareIntent.putExtra(Intent.EXTRA_SUBJECT, app.name); diff --git a/app/src/main/java/org/fdroid/fdroid/views/categories/AppCardController.java b/app/src/main/java/org/fdroid/fdroid/views/categories/AppCardController.java index 21fb2b06c..49a6f0310 100644 --- a/app/src/main/java/org/fdroid/fdroid/views/categories/AppCardController.java +++ b/app/src/main/java/org/fdroid/fdroid/views/categories/AppCardController.java @@ -3,6 +3,7 @@ package org.fdroid.fdroid.views.categories; import android.app.Activity; import android.content.Intent; import android.graphics.Color; +import android.net.Uri; import android.os.Build; import android.os.Bundle; import androidx.annotation.IdRes; @@ -30,7 +31,7 @@ import java.util.Locale; * + {@link R.id#new_tag} ({@link TextView}, optional) */ public class AppCardController extends RecyclerView.ViewHolder - implements View.OnClickListener { + implements View.OnClickListener, View.OnLongClickListener { /** * After this many days, don't consider showing the "New" tag next to an app. @@ -68,6 +69,7 @@ public class AppCardController extends RecyclerView.ViewHolder newTag = (TextView) itemView.findViewById(R.id.new_tag); itemView.setOnClickListener(this); + itemView.setOnLongClickListener(this); } /** @@ -140,4 +142,18 @@ public class AppCardController extends RecyclerView.ViewHolder activity.startActivity(intent); } } + /** + * When the user clicks/long https://forum.f-droid.org/search?q= + */ + @Override + public boolean onLongClick(View v) { + if (currentApp == null) { + return true; + } + Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://forum.f-droid.org/search?q=" + +currentApp.name.replaceAll(" ","%20"))); + activity.startActivity(browserIntent); + return true; + } + } diff --git a/app/src/main/res/drawable-xxhdpi/gitlabi.png b/app/src/main/res/drawable-xxhdpi/gitlabi.png new file mode 100644 index 000000000..6dde0f7b8 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/gitlabi.png differ diff --git a/app/src/main/res/drawable/gitlab.png b/app/src/main/res/drawable/gitlab.png new file mode 100644 index 000000000..e460c0645 Binary files /dev/null and b/app/src/main/res/drawable/gitlab.png differ diff --git a/app/src/main/res/menu/details2.xml b/app/src/main/res/menu/details2.xml index 86e9e4c03..72206e96f 100644 --- a/app/src/main/res/menu/details2.xml +++ b/app/src/main/res/menu/details2.xml @@ -2,6 +2,11 @@ +