Changed repos list menus to bottom sheets
This commit is contained in:
		@@ -1,19 +1,19 @@
 | 
			
		||||
package org.mian.gitnex.adapters;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import android.content.Intent;
 | 
			
		||||
import android.graphics.Typeface;
 | 
			
		||||
import android.view.LayoutInflater;
 | 
			
		||||
import android.view.MenuItem;
 | 
			
		||||
import android.view.View;
 | 
			
		||||
import android.view.ViewGroup;
 | 
			
		||||
import android.widget.ImageView;
 | 
			
		||||
import android.widget.TextView;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.appcompat.widget.PopupMenu;
 | 
			
		||||
import androidx.recyclerview.widget.RecyclerView;
 | 
			
		||||
import com.amulyakhare.textdrawable.TextDrawable;
 | 
			
		||||
import com.amulyakhare.textdrawable.util.ColorGenerator;
 | 
			
		||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
 | 
			
		||||
import com.squareup.picasso.Picasso;
 | 
			
		||||
import org.mian.gitnex.R;
 | 
			
		||||
import org.mian.gitnex.activities.OpenRepoInBrowserActivity;
 | 
			
		||||
@@ -23,9 +23,7 @@ import org.mian.gitnex.activities.RepoWatchersActivity;
 | 
			
		||||
import org.mian.gitnex.helpers.RoundedTransformation;
 | 
			
		||||
import org.mian.gitnex.models.UserRepositories;
 | 
			
		||||
import org.mian.gitnex.util.TinyDB;
 | 
			
		||||
import java.lang.reflect.Field;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Author M M Arif
 | 
			
		||||
@@ -66,85 +64,63 @@ public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<ExploreRepo
 | 
			
		||||
            repoOpenIssuesCount = itemView.findViewById(R.id.repoOpenIssuesCount);
 | 
			
		||||
            ImageView reposDropdownMenu = itemView.findViewById(R.id.reposDropdownMenu);
 | 
			
		||||
 | 
			
		||||
            itemView.setOnClickListener(new View.OnClickListener() {
 | 
			
		||||
                @Override
 | 
			
		||||
                public void onClick(View v) {
 | 
			
		||||
            itemView.setOnClickListener(v -> {
 | 
			
		||||
 | 
			
		||||
                    Context context = v.getContext();
 | 
			
		||||
                    TextView repoFullName = v.findViewById(R.id.repoFullName);
 | 
			
		||||
                Context context = v.getContext();
 | 
			
		||||
                TextView repoFullName = v.findViewById(R.id.repoFullName);
 | 
			
		||||
 | 
			
		||||
                    Intent intent = new Intent(context, RepoDetailActivity.class);
 | 
			
		||||
                    intent.putExtra("repoFullName", repoFullName.getText().toString());
 | 
			
		||||
                Intent intent = new Intent(context, RepoDetailActivity.class);
 | 
			
		||||
                intent.putExtra("repoFullName", repoFullName.getText().toString());
 | 
			
		||||
 | 
			
		||||
                    TinyDB tinyDb = new TinyDB(context);
 | 
			
		||||
                    tinyDb.putString("repoFullName", repoFullName.getText().toString());
 | 
			
		||||
                    tinyDb.putBoolean("resumeIssues", true);
 | 
			
		||||
                    context.startActivity(intent);
 | 
			
		||||
                TinyDB tinyDb = new TinyDB(context);
 | 
			
		||||
                tinyDb.putString("repoFullName", repoFullName.getText().toString());
 | 
			
		||||
                tinyDb.putBoolean("resumeIssues", true);
 | 
			
		||||
                context.startActivity(intent);
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            reposDropdownMenu.setOnClickListener(new View.OnClickListener() {
 | 
			
		||||
                @Override
 | 
			
		||||
                public void onClick(View v) {
 | 
			
		||||
            reposDropdownMenu.setOnClickListener(v -> {
 | 
			
		||||
 | 
			
		||||
                    final Context context = v.getContext();
 | 
			
		||||
                    //Context context_ = new ContextThemeWrapper(context, R.style.popupMenuStyle);
 | 
			
		||||
                final Context context = v.getContext();
 | 
			
		||||
 | 
			
		||||
                    PopupMenu popupMenu = new PopupMenu(context, v);
 | 
			
		||||
                    popupMenu.inflate(R.menu.repo_dotted_list_menu);
 | 
			
		||||
                @SuppressLint("InflateParams")
 | 
			
		||||
                View view = LayoutInflater.from(context).inflate(R.layout.bottom_sheet_repository_in_list, null);
 | 
			
		||||
 | 
			
		||||
                    Object menuHelper;
 | 
			
		||||
                    Class[] argTypes;
 | 
			
		||||
                    try {
 | 
			
		||||
                TextView repoOpenInBrowser = view.findViewById(R.id.repoOpenInBrowser);
 | 
			
		||||
                TextView repoStargazers = view.findViewById(R.id.repoStargazers);
 | 
			
		||||
                TextView repoWatchers = view.findViewById(R.id.repoWatchers);
 | 
			
		||||
 | 
			
		||||
                        Field fMenuHelper = PopupMenu.class.getDeclaredField("mPopup");
 | 
			
		||||
                        fMenuHelper.setAccessible(true);
 | 
			
		||||
                        menuHelper = fMenuHelper.get(popupMenu);
 | 
			
		||||
                        argTypes = new Class[] { boolean.class };
 | 
			
		||||
                        Objects.requireNonNull(menuHelper).getClass().getDeclaredMethod("setForceShowIcon",
 | 
			
		||||
                                argTypes).invoke(menuHelper, true);
 | 
			
		||||
                BottomSheetDialog dialog = new BottomSheetDialog(context);
 | 
			
		||||
                dialog.setContentView(view);
 | 
			
		||||
                dialog.show();
 | 
			
		||||
 | 
			
		||||
                    } catch (Exception e) {
 | 
			
		||||
                repoOpenInBrowser.setOnClickListener(openInBrowser -> {
 | 
			
		||||
 | 
			
		||||
                        popupMenu.show();
 | 
			
		||||
                        return;
 | 
			
		||||
                    Intent intentOpenInBrowser = new Intent(context, OpenRepoInBrowserActivity.class);
 | 
			
		||||
                    intentOpenInBrowser.putExtra("repoFullNameBrowser", fullName.getText());
 | 
			
		||||
                    context.startActivity(intentOpenInBrowser);
 | 
			
		||||
                    dialog.dismiss();
 | 
			
		||||
 | 
			
		||||
                    }
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
                    popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
 | 
			
		||||
                        @Override
 | 
			
		||||
                        public boolean onMenuItemClick(MenuItem item) {
 | 
			
		||||
                            switch (item.getItemId()) {
 | 
			
		||||
                                case R.id.repoStargazers:
 | 
			
		||||
                repoStargazers.setOnClickListener(openInBrowser -> {
 | 
			
		||||
 | 
			
		||||
                                    Intent intent = new Intent(context, RepoStargazersActivity.class);
 | 
			
		||||
                                    intent.putExtra("repoFullNameForStars", fullName.getText());
 | 
			
		||||
                                    context.startActivity(intent);
 | 
			
		||||
                                    break;
 | 
			
		||||
                    Intent intent = new Intent(context, RepoStargazersActivity.class);
 | 
			
		||||
                    intent.putExtra("repoFullNameForStars", fullName.getText());
 | 
			
		||||
                    context.startActivity(intent);
 | 
			
		||||
                    dialog.dismiss();
 | 
			
		||||
 | 
			
		||||
                                case R.id.repoWatchers:
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
                                    Intent intentW = new Intent(context, RepoWatchersActivity.class);
 | 
			
		||||
                                    intentW.putExtra("repoFullNameForWatchers", fullName.getText());
 | 
			
		||||
                                    context.startActivity(intentW);
 | 
			
		||||
                                    break;
 | 
			
		||||
                repoWatchers.setOnClickListener(openInBrowser -> {
 | 
			
		||||
 | 
			
		||||
                                case R.id.repoOpenInBrowser:
 | 
			
		||||
                    Intent intentW = new Intent(context, RepoWatchersActivity.class);
 | 
			
		||||
                    intentW.putExtra("repoFullNameForWatchers", fullName.getText());
 | 
			
		||||
                    context.startActivity(intentW);
 | 
			
		||||
                    dialog.dismiss();
 | 
			
		||||
 | 
			
		||||
                                    Intent intentOpenInBrowser = new Intent(context, OpenRepoInBrowserActivity.class);
 | 
			
		||||
                                    intentOpenInBrowser.putExtra("repoFullNameBrowser", fullName.getText());
 | 
			
		||||
                                    context.startActivity(intentOpenInBrowser);
 | 
			
		||||
                                    break;
 | 
			
		||||
 | 
			
		||||
                            }
 | 
			
		||||
                            return false;
 | 
			
		||||
                        }
 | 
			
		||||
                    });
 | 
			
		||||
 | 
			
		||||
                    popupMenu.show();
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
                });
 | 
			
		||||
                
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
package org.mian.gitnex.adapters;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import android.content.Intent;
 | 
			
		||||
import android.graphics.Typeface;
 | 
			
		||||
import android.view.LayoutInflater;
 | 
			
		||||
import android.view.MenuItem;
 | 
			
		||||
import android.view.View;
 | 
			
		||||
import android.view.ViewGroup;
 | 
			
		||||
import android.widget.Filter;
 | 
			
		||||
@@ -13,6 +13,7 @@ import android.widget.ImageView;
 | 
			
		||||
import android.widget.TextView;
 | 
			
		||||
import com.amulyakhare.textdrawable.TextDrawable;
 | 
			
		||||
import com.amulyakhare.textdrawable.util.ColorGenerator;
 | 
			
		||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
 | 
			
		||||
import com.squareup.picasso.Picasso;
 | 
			
		||||
import org.mian.gitnex.R;
 | 
			
		||||
import org.mian.gitnex.activities.OpenRepoInBrowserActivity;
 | 
			
		||||
@@ -22,11 +23,9 @@ import org.mian.gitnex.activities.RepoWatchersActivity;
 | 
			
		||||
import org.mian.gitnex.helpers.RoundedTransformation;
 | 
			
		||||
import org.mian.gitnex.models.UserRepositories;
 | 
			
		||||
import org.mian.gitnex.util.TinyDB;
 | 
			
		||||
import java.lang.reflect.Field;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.appcompat.widget.PopupMenu;
 | 
			
		||||
import androidx.recyclerview.widget.RecyclerView;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -64,85 +63,63 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
 | 
			
		||||
            ImageView reposDropdownMenu = itemView.findViewById(R.id.reposDropdownMenu);
 | 
			
		||||
            repoType = itemView.findViewById(R.id.repoType);
 | 
			
		||||
 | 
			
		||||
            itemView.setOnClickListener(new View.OnClickListener() {
 | 
			
		||||
                @Override
 | 
			
		||||
                public void onClick(View v) {
 | 
			
		||||
            itemView.setOnClickListener(v -> {
 | 
			
		||||
 | 
			
		||||
                    Context context = v.getContext();
 | 
			
		||||
                Context context = v.getContext();
 | 
			
		||||
 | 
			
		||||
                    Intent intent = new Intent(context, RepoDetailActivity.class);
 | 
			
		||||
                    intent.putExtra("repoFullName", fullNameMy.getText().toString());
 | 
			
		||||
                Intent intent = new Intent(context, RepoDetailActivity.class);
 | 
			
		||||
                intent.putExtra("repoFullName", fullNameMy.getText().toString());
 | 
			
		||||
 | 
			
		||||
                    TinyDB tinyDb = new TinyDB(context);
 | 
			
		||||
                    tinyDb.putString("repoFullName", fullNameMy.getText().toString());
 | 
			
		||||
                    tinyDb.putString("repoType", repoType.getText().toString());
 | 
			
		||||
                    tinyDb.putBoolean("resumeIssues", true);
 | 
			
		||||
                    context.startActivity(intent);
 | 
			
		||||
                TinyDB tinyDb = new TinyDB(context);
 | 
			
		||||
                tinyDb.putString("repoFullName", fullNameMy.getText().toString());
 | 
			
		||||
                tinyDb.putString("repoType", repoType.getText().toString());
 | 
			
		||||
                tinyDb.putBoolean("resumeIssues", true);
 | 
			
		||||
                context.startActivity(intent);
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            reposDropdownMenu.setOnClickListener(new View.OnClickListener() {
 | 
			
		||||
                @Override
 | 
			
		||||
                public void onClick(View v) {
 | 
			
		||||
            reposDropdownMenu.setOnClickListener(v -> {
 | 
			
		||||
 | 
			
		||||
                    final Context context = v.getContext();
 | 
			
		||||
                    //Context context_ = new ContextThemeWrapper(context, R.style.popupMenuStyle);
 | 
			
		||||
                final Context context = v.getContext();
 | 
			
		||||
 | 
			
		||||
                    PopupMenu popupMenu = new PopupMenu(context, v);
 | 
			
		||||
                    popupMenu.inflate(R.menu.repo_dotted_list_menu);
 | 
			
		||||
                @SuppressLint("InflateParams")
 | 
			
		||||
                View view = LayoutInflater.from(context).inflate(R.layout.bottom_sheet_repository_in_list, null);
 | 
			
		||||
 | 
			
		||||
                    Object menuHelper;
 | 
			
		||||
                    Class[] argTypes;
 | 
			
		||||
                    try {
 | 
			
		||||
                TextView repoOpenInBrowser = view.findViewById(R.id.repoOpenInBrowser);
 | 
			
		||||
                TextView repoStargazers = view.findViewById(R.id.repoStargazers);
 | 
			
		||||
                TextView repoWatchers = view.findViewById(R.id.repoWatchers);
 | 
			
		||||
 | 
			
		||||
                        Field fMenuHelper = PopupMenu.class.getDeclaredField("mPopup");
 | 
			
		||||
                        fMenuHelper.setAccessible(true);
 | 
			
		||||
                        menuHelper = fMenuHelper.get(popupMenu);
 | 
			
		||||
                        argTypes = new Class[] { boolean.class };
 | 
			
		||||
                        menuHelper.getClass().getDeclaredMethod("setForceShowIcon",
 | 
			
		||||
                                argTypes).invoke(menuHelper, true);
 | 
			
		||||
                BottomSheetDialog dialog = new BottomSheetDialog(context);
 | 
			
		||||
                dialog.setContentView(view);
 | 
			
		||||
                dialog.show();
 | 
			
		||||
 | 
			
		||||
                    } catch (Exception e) {
 | 
			
		||||
                repoOpenInBrowser.setOnClickListener(openInBrowser -> {
 | 
			
		||||
 | 
			
		||||
                        popupMenu.show();
 | 
			
		||||
                        return;
 | 
			
		||||
                    Intent intentOpenInBrowser = new Intent(context, OpenRepoInBrowserActivity.class);
 | 
			
		||||
                    intentOpenInBrowser.putExtra("repoFullNameBrowser", fullNameMy.getText());
 | 
			
		||||
                    context.startActivity(intentOpenInBrowser);
 | 
			
		||||
                    dialog.dismiss();
 | 
			
		||||
 | 
			
		||||
                    }
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
                    popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
 | 
			
		||||
                        @Override
 | 
			
		||||
                        public boolean onMenuItemClick(MenuItem item) {
 | 
			
		||||
                            switch (item.getItemId()) {
 | 
			
		||||
                                case R.id.repoStargazers:
 | 
			
		||||
                repoStargazers.setOnClickListener(openInBrowser -> {
 | 
			
		||||
 | 
			
		||||
                                    Intent intent = new Intent(context, RepoStargazersActivity.class);
 | 
			
		||||
                                    intent.putExtra("repoFullNameForStars", fullNameMy.getText());
 | 
			
		||||
                                    context.startActivity(intent);
 | 
			
		||||
                                    break;
 | 
			
		||||
                    Intent intent = new Intent(context, RepoStargazersActivity.class);
 | 
			
		||||
                    intent.putExtra("repoFullNameForStars", fullNameMy.getText());
 | 
			
		||||
                    context.startActivity(intent);
 | 
			
		||||
                    dialog.dismiss();
 | 
			
		||||
 | 
			
		||||
                                case R.id.repoWatchers:
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
                                    Intent intentW = new Intent(context, RepoWatchersActivity.class);
 | 
			
		||||
                                    intentW.putExtra("repoFullNameForWatchers", fullNameMy.getText());
 | 
			
		||||
                                    context.startActivity(intentW);
 | 
			
		||||
                                    break;
 | 
			
		||||
                repoWatchers.setOnClickListener(openInBrowser -> {
 | 
			
		||||
 | 
			
		||||
                                case R.id.repoOpenInBrowser:
 | 
			
		||||
                    Intent intentW = new Intent(context, RepoWatchersActivity.class);
 | 
			
		||||
                    intentW.putExtra("repoFullNameForWatchers", fullNameMy.getText());
 | 
			
		||||
                    context.startActivity(intentW);
 | 
			
		||||
                    dialog.dismiss();
 | 
			
		||||
 | 
			
		||||
                                    Intent intentOpenInBrowser = new Intent(context, OpenRepoInBrowserActivity.class);
 | 
			
		||||
                                    intentOpenInBrowser.putExtra("repoFullNameBrowser", fullNameMy.getText());
 | 
			
		||||
                                    context.startActivity(intentOpenInBrowser);
 | 
			
		||||
                                    break;
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
                            }
 | 
			
		||||
                            return false;
 | 
			
		||||
                        }
 | 
			
		||||
                    });
 | 
			
		||||
 | 
			
		||||
                    popupMenu.show();
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,13 +1,12 @@
 | 
			
		||||
package org.mian.gitnex.adapters;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import android.content.Intent;
 | 
			
		||||
import android.graphics.Typeface;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.appcompat.widget.PopupMenu;
 | 
			
		||||
import androidx.recyclerview.widget.RecyclerView;
 | 
			
		||||
import android.view.LayoutInflater;
 | 
			
		||||
import android.view.MenuItem;
 | 
			
		||||
import android.view.View;
 | 
			
		||||
import android.view.ViewGroup;
 | 
			
		||||
import android.widget.Filter;
 | 
			
		||||
@@ -16,6 +15,7 @@ import android.widget.ImageView;
 | 
			
		||||
import android.widget.TextView;
 | 
			
		||||
import com.amulyakhare.textdrawable.TextDrawable;
 | 
			
		||||
import com.amulyakhare.textdrawable.util.ColorGenerator;
 | 
			
		||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
 | 
			
		||||
import com.squareup.picasso.Picasso;
 | 
			
		||||
import org.mian.gitnex.R;
 | 
			
		||||
import org.mian.gitnex.activities.OpenRepoInBrowserActivity;
 | 
			
		||||
@@ -25,7 +25,6 @@ import org.mian.gitnex.activities.RepoWatchersActivity;
 | 
			
		||||
import org.mian.gitnex.helpers.RoundedTransformation;
 | 
			
		||||
import org.mian.gitnex.models.UserRepositories;
 | 
			
		||||
import org.mian.gitnex.util.TinyDB;
 | 
			
		||||
import java.lang.reflect.Field;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@@ -65,88 +64,65 @@ public class ReposListAdapter extends RecyclerView.Adapter<ReposListAdapter.Repo
 | 
			
		||||
            ImageView reposDropdownMenu = itemView.findViewById(R.id.reposDropdownMenu);
 | 
			
		||||
            repoType = itemView.findViewById(R.id.repoType);
 | 
			
		||||
 | 
			
		||||
            itemView.setOnClickListener(new View.OnClickListener() {
 | 
			
		||||
                @Override
 | 
			
		||||
                public void onClick(View v) {
 | 
			
		||||
            itemView.setOnClickListener(v -> {
 | 
			
		||||
 | 
			
		||||
                    Context context = v.getContext();
 | 
			
		||||
                    TextView repoFullName = v.findViewById(R.id.repoFullName);
 | 
			
		||||
                    TextView repoType_ = v.findViewById(R.id.repoType);
 | 
			
		||||
                Context context = v.getContext();
 | 
			
		||||
                TextView repoFullName = v.findViewById(R.id.repoFullName);
 | 
			
		||||
                TextView repoType_ = v.findViewById(R.id.repoType);
 | 
			
		||||
 | 
			
		||||
                    Intent intent = new Intent(context, RepoDetailActivity.class);
 | 
			
		||||
                    intent.putExtra("repoFullName", repoFullName.getText().toString());
 | 
			
		||||
                Intent intent = new Intent(context, RepoDetailActivity.class);
 | 
			
		||||
                intent.putExtra("repoFullName", repoFullName.getText().toString());
 | 
			
		||||
 | 
			
		||||
                    TinyDB tinyDb = new TinyDB(context);
 | 
			
		||||
                    tinyDb.putString("repoFullName", repoFullName.getText().toString());
 | 
			
		||||
                    tinyDb.putString("repoType", repoType_.getText().toString());
 | 
			
		||||
                    tinyDb.putBoolean("resumeIssues", true);
 | 
			
		||||
                    context.startActivity(intent);
 | 
			
		||||
                TinyDB tinyDb = new TinyDB(context);
 | 
			
		||||
                tinyDb.putString("repoFullName", repoFullName.getText().toString());
 | 
			
		||||
                tinyDb.putString("repoType", repoType_.getText().toString());
 | 
			
		||||
                tinyDb.putBoolean("resumeIssues", true);
 | 
			
		||||
                context.startActivity(intent);
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            reposDropdownMenu.setOnClickListener(new View.OnClickListener() {
 | 
			
		||||
                @Override
 | 
			
		||||
                public void onClick(View v) {
 | 
			
		||||
            reposDropdownMenu.setOnClickListener(v -> {
 | 
			
		||||
 | 
			
		||||
                    final Context context = v.getContext();
 | 
			
		||||
                    //Context context_ = new ContextThemeWrapper(context, R.style.popupMenuStyle);
 | 
			
		||||
                final Context context = v.getContext();
 | 
			
		||||
 | 
			
		||||
                    PopupMenu popupMenu = new PopupMenu(context, v);
 | 
			
		||||
                    popupMenu.inflate(R.menu.repo_dotted_list_menu);
 | 
			
		||||
                @SuppressLint("InflateParams")
 | 
			
		||||
                View view = LayoutInflater.from(context).inflate(R.layout.bottom_sheet_repository_in_list, null);
 | 
			
		||||
 | 
			
		||||
                    Object menuHelper;
 | 
			
		||||
                    Class[] argTypes;
 | 
			
		||||
                    try {
 | 
			
		||||
                TextView repoOpenInBrowser = view.findViewById(R.id.repoOpenInBrowser);
 | 
			
		||||
                TextView repoStargazers = view.findViewById(R.id.repoStargazers);
 | 
			
		||||
                TextView repoWatchers = view.findViewById(R.id.repoWatchers);
 | 
			
		||||
 | 
			
		||||
                        Field fMenuHelper = PopupMenu.class.getDeclaredField("mPopup");
 | 
			
		||||
                        fMenuHelper.setAccessible(true);
 | 
			
		||||
                        menuHelper = fMenuHelper.get(popupMenu);
 | 
			
		||||
                        argTypes = new Class[] { boolean.class };
 | 
			
		||||
                        assert menuHelper != null;
 | 
			
		||||
                        menuHelper.getClass().getDeclaredMethod("setForceShowIcon",
 | 
			
		||||
                                argTypes).invoke(menuHelper, true);
 | 
			
		||||
                BottomSheetDialog dialog = new BottomSheetDialog(context);
 | 
			
		||||
                dialog.setContentView(view);
 | 
			
		||||
                dialog.show();
 | 
			
		||||
 | 
			
		||||
                    } catch (Exception e) {
 | 
			
		||||
                repoOpenInBrowser.setOnClickListener(openInBrowser -> {
 | 
			
		||||
 | 
			
		||||
                        popupMenu.show();
 | 
			
		||||
                        return;
 | 
			
		||||
                    Intent intentOpenInBrowser = new Intent(context, OpenRepoInBrowserActivity.class);
 | 
			
		||||
                    intentOpenInBrowser.putExtra("repoFullNameBrowser", fullName.getText());
 | 
			
		||||
                    context.startActivity(intentOpenInBrowser);
 | 
			
		||||
                    dialog.dismiss();
 | 
			
		||||
 | 
			
		||||
                    }
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
                    popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
 | 
			
		||||
                        @Override
 | 
			
		||||
                        public boolean onMenuItemClick(MenuItem item) {
 | 
			
		||||
                            switch (item.getItemId()) {
 | 
			
		||||
                                case R.id.repoStargazers:
 | 
			
		||||
                repoStargazers.setOnClickListener(openInBrowser -> {
 | 
			
		||||
 | 
			
		||||
                                    Intent intent = new Intent(context, RepoStargazersActivity.class);
 | 
			
		||||
                                    intent.putExtra("repoFullNameForStars", fullName.getText());
 | 
			
		||||
                                    context.startActivity(intent);
 | 
			
		||||
                                    break;
 | 
			
		||||
                    Intent intent = new Intent(context, RepoStargazersActivity.class);
 | 
			
		||||
                    intent.putExtra("repoFullNameForStars", fullName.getText());
 | 
			
		||||
                    context.startActivity(intent);
 | 
			
		||||
                    dialog.dismiss();
 | 
			
		||||
 | 
			
		||||
                                case R.id.repoWatchers:
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
                                    Intent intentW = new Intent(context, RepoWatchersActivity.class);
 | 
			
		||||
                                    intentW.putExtra("repoFullNameForWatchers", fullName.getText());
 | 
			
		||||
                                    context.startActivity(intentW);
 | 
			
		||||
                                    break;
 | 
			
		||||
                repoWatchers.setOnClickListener(openInBrowser -> {
 | 
			
		||||
 | 
			
		||||
                                case R.id.repoOpenInBrowser:
 | 
			
		||||
                    Intent intentW = new Intent(context, RepoWatchersActivity.class);
 | 
			
		||||
                    intentW.putExtra("repoFullNameForWatchers", fullName.getText());
 | 
			
		||||
                    context.startActivity(intentW);
 | 
			
		||||
                    dialog.dismiss();
 | 
			
		||||
 | 
			
		||||
                                    Intent intentOpenInBrowser = new Intent(context, OpenRepoInBrowserActivity.class);
 | 
			
		||||
                                    intentOpenInBrowser.putExtra("repoFullNameBrowser", fullName.getText());
 | 
			
		||||
                                    context.startActivity(intentOpenInBrowser);
 | 
			
		||||
                                    break;
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
                            }
 | 
			
		||||
                            return false;
 | 
			
		||||
                        }
 | 
			
		||||
                    });
 | 
			
		||||
 | 
			
		||||
                    popupMenu.show();
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
package org.mian.gitnex.adapters;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import android.content.Intent;
 | 
			
		||||
import android.graphics.Typeface;
 | 
			
		||||
import android.view.LayoutInflater;
 | 
			
		||||
import android.view.MenuItem;
 | 
			
		||||
import android.view.View;
 | 
			
		||||
import android.view.ViewGroup;
 | 
			
		||||
import android.widget.Filter;
 | 
			
		||||
@@ -13,6 +13,7 @@ import android.widget.ImageView;
 | 
			
		||||
import android.widget.TextView;
 | 
			
		||||
import com.amulyakhare.textdrawable.TextDrawable;
 | 
			
		||||
import com.amulyakhare.textdrawable.util.ColorGenerator;
 | 
			
		||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
 | 
			
		||||
import com.squareup.picasso.Picasso;
 | 
			
		||||
import org.mian.gitnex.R;
 | 
			
		||||
import org.mian.gitnex.activities.OpenRepoInBrowserActivity;
 | 
			
		||||
@@ -22,11 +23,9 @@ import org.mian.gitnex.activities.RepoWatchersActivity;
 | 
			
		||||
import org.mian.gitnex.helpers.RoundedTransformation;
 | 
			
		||||
import org.mian.gitnex.models.UserRepositories;
 | 
			
		||||
import org.mian.gitnex.util.TinyDB;
 | 
			
		||||
import java.lang.reflect.Field;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.appcompat.widget.PopupMenu;
 | 
			
		||||
import androidx.recyclerview.widget.RecyclerView;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -64,85 +63,63 @@ public class RepositoriesByOrgAdapter extends RecyclerView.Adapter<RepositoriesB
 | 
			
		||||
            ImageView reposDropdownMenu = itemView.findViewById(R.id.reposDropdownMenu);
 | 
			
		||||
            repoType = itemView.findViewById(R.id.repoType);
 | 
			
		||||
 | 
			
		||||
            itemView.setOnClickListener(new View.OnClickListener() {
 | 
			
		||||
                @Override
 | 
			
		||||
                public void onClick(View v) {
 | 
			
		||||
            itemView.setOnClickListener(v -> {
 | 
			
		||||
 | 
			
		||||
                    Context context = v.getContext();
 | 
			
		||||
                Context context = v.getContext();
 | 
			
		||||
 | 
			
		||||
                    Intent intent = new Intent(context, RepoDetailActivity.class);
 | 
			
		||||
                    intent.putExtra("repoFullName", fullName.getText().toString());
 | 
			
		||||
                Intent intent = new Intent(context, RepoDetailActivity.class);
 | 
			
		||||
                intent.putExtra("repoFullName", fullName.getText().toString());
 | 
			
		||||
 | 
			
		||||
                    TinyDB tinyDb = new TinyDB(context);
 | 
			
		||||
                    tinyDb.putString("repoFullName", fullName.getText().toString());
 | 
			
		||||
                    tinyDb.putString("repoType", repoType.getText().toString());
 | 
			
		||||
                    tinyDb.putBoolean("resumeIssues", true);
 | 
			
		||||
                    context.startActivity(intent);
 | 
			
		||||
                TinyDB tinyDb = new TinyDB(context);
 | 
			
		||||
                tinyDb.putString("repoFullName", fullName.getText().toString());
 | 
			
		||||
                tinyDb.putString("repoType", repoType.getText().toString());
 | 
			
		||||
                tinyDb.putBoolean("resumeIssues", true);
 | 
			
		||||
                context.startActivity(intent);
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            reposDropdownMenu.setOnClickListener(new View.OnClickListener() {
 | 
			
		||||
                @Override
 | 
			
		||||
                public void onClick(View v) {
 | 
			
		||||
            reposDropdownMenu.setOnClickListener(v -> {
 | 
			
		||||
 | 
			
		||||
                    final Context context = v.getContext();
 | 
			
		||||
                    //Context context_ = new ContextThemeWrapper(context, R.style.popupMenuStyle);
 | 
			
		||||
                final Context context = v.getContext();
 | 
			
		||||
 | 
			
		||||
                    PopupMenu popupMenu = new PopupMenu(context, v);
 | 
			
		||||
                    popupMenu.inflate(R.menu.repo_dotted_list_menu);
 | 
			
		||||
                @SuppressLint("InflateParams")
 | 
			
		||||
                View view = LayoutInflater.from(context).inflate(R.layout.bottom_sheet_repository_in_list, null);
 | 
			
		||||
 | 
			
		||||
                    Object menuHelper;
 | 
			
		||||
                    Class[] argTypes;
 | 
			
		||||
                    try {
 | 
			
		||||
                TextView repoOpenInBrowser = view.findViewById(R.id.repoOpenInBrowser);
 | 
			
		||||
                TextView repoStargazers = view.findViewById(R.id.repoStargazers);
 | 
			
		||||
                TextView repoWatchers = view.findViewById(R.id.repoWatchers);
 | 
			
		||||
 | 
			
		||||
                        Field fMenuHelper = PopupMenu.class.getDeclaredField("mPopup");
 | 
			
		||||
                        fMenuHelper.setAccessible(true);
 | 
			
		||||
                        menuHelper = fMenuHelper.get(popupMenu);
 | 
			
		||||
                        argTypes = new Class[] { boolean.class };
 | 
			
		||||
                        menuHelper.getClass().getDeclaredMethod("setForceShowIcon",
 | 
			
		||||
                                argTypes).invoke(menuHelper, true);
 | 
			
		||||
                BottomSheetDialog dialog = new BottomSheetDialog(context);
 | 
			
		||||
                dialog.setContentView(view);
 | 
			
		||||
                dialog.show();
 | 
			
		||||
 | 
			
		||||
                    } catch (Exception e) {
 | 
			
		||||
                repoOpenInBrowser.setOnClickListener(openInBrowser -> {
 | 
			
		||||
 | 
			
		||||
                        popupMenu.show();
 | 
			
		||||
                        return;
 | 
			
		||||
                    Intent intentOpenInBrowser = new Intent(context, OpenRepoInBrowserActivity.class);
 | 
			
		||||
                    intentOpenInBrowser.putExtra("repoFullNameBrowser", fullName.getText());
 | 
			
		||||
                    context.startActivity(intentOpenInBrowser);
 | 
			
		||||
                    dialog.dismiss();
 | 
			
		||||
 | 
			
		||||
                    }
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
                    popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
 | 
			
		||||
                        @Override
 | 
			
		||||
                        public boolean onMenuItemClick(MenuItem item) {
 | 
			
		||||
                            switch (item.getItemId()) {
 | 
			
		||||
                                case R.id.repoStargazers:
 | 
			
		||||
                repoStargazers.setOnClickListener(openInBrowser -> {
 | 
			
		||||
 | 
			
		||||
                                    Intent intent = new Intent(context, RepoStargazersActivity.class);
 | 
			
		||||
                                    intent.putExtra("repoFullNameForStars", fullName.getText());
 | 
			
		||||
                                    context.startActivity(intent);
 | 
			
		||||
                                    break;
 | 
			
		||||
                    Intent intent = new Intent(context, RepoStargazersActivity.class);
 | 
			
		||||
                    intent.putExtra("repoFullNameForStars", fullName.getText());
 | 
			
		||||
                    context.startActivity(intent);
 | 
			
		||||
                    dialog.dismiss();
 | 
			
		||||
 | 
			
		||||
                                case R.id.repoWatchers:
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
                                    Intent intentW = new Intent(context, RepoWatchersActivity.class);
 | 
			
		||||
                                    intentW.putExtra("repoFullNameForWatchers", fullName.getText());
 | 
			
		||||
                                    context.startActivity(intentW);
 | 
			
		||||
                                    break;
 | 
			
		||||
                repoWatchers.setOnClickListener(openInBrowser -> {
 | 
			
		||||
 | 
			
		||||
                                case R.id.repoOpenInBrowser:
 | 
			
		||||
                    Intent intentW = new Intent(context, RepoWatchersActivity.class);
 | 
			
		||||
                    intentW.putExtra("repoFullNameForWatchers", fullName.getText());
 | 
			
		||||
                    context.startActivity(intentW);
 | 
			
		||||
                    dialog.dismiss();
 | 
			
		||||
 | 
			
		||||
                                    Intent intentOpenInBrowser = new Intent(context, OpenRepoInBrowserActivity.class);
 | 
			
		||||
                                    intentOpenInBrowser.putExtra("repoFullNameBrowser", fullName.getText());
 | 
			
		||||
                                    context.startActivity(intentOpenInBrowser);
 | 
			
		||||
                                    break;
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
                            }
 | 
			
		||||
                            return false;
 | 
			
		||||
                        }
 | 
			
		||||
                    });
 | 
			
		||||
 | 
			
		||||
                    popupMenu.show();
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
package org.mian.gitnex.adapters;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.content.Context;
 | 
			
		||||
import android.content.Intent;
 | 
			
		||||
import android.graphics.Typeface;
 | 
			
		||||
import android.view.LayoutInflater;
 | 
			
		||||
import android.view.MenuItem;
 | 
			
		||||
import android.view.View;
 | 
			
		||||
import android.view.ViewGroup;
 | 
			
		||||
import android.widget.Filter;
 | 
			
		||||
@@ -13,6 +13,7 @@ import android.widget.ImageView;
 | 
			
		||||
import android.widget.TextView;
 | 
			
		||||
import com.amulyakhare.textdrawable.TextDrawable;
 | 
			
		||||
import com.amulyakhare.textdrawable.util.ColorGenerator;
 | 
			
		||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
 | 
			
		||||
import com.squareup.picasso.Picasso;
 | 
			
		||||
import org.mian.gitnex.R;
 | 
			
		||||
import org.mian.gitnex.activities.OpenRepoInBrowserActivity;
 | 
			
		||||
@@ -22,12 +23,9 @@ import org.mian.gitnex.activities.RepoWatchersActivity;
 | 
			
		||||
import org.mian.gitnex.helpers.RoundedTransformation;
 | 
			
		||||
import org.mian.gitnex.models.UserRepositories;
 | 
			
		||||
import org.mian.gitnex.util.TinyDB;
 | 
			
		||||
import java.lang.reflect.Field;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import androidx.annotation.NonNull;
 | 
			
		||||
import androidx.appcompat.view.ContextThemeWrapper;
 | 
			
		||||
import androidx.appcompat.widget.PopupMenu;
 | 
			
		||||
import androidx.recyclerview.widget.RecyclerView;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -65,85 +63,63 @@ public class StarredReposListAdapter extends RecyclerView.Adapter<StarredReposLi
 | 
			
		||||
            ImageView reposDropdownMenu = itemView.findViewById(R.id.reposDropdownMenu);
 | 
			
		||||
            repoType = itemView.findViewById(R.id.repoType);
 | 
			
		||||
 | 
			
		||||
            itemView.setOnClickListener(new View.OnClickListener() {
 | 
			
		||||
                @Override
 | 
			
		||||
                public void onClick(View v) {
 | 
			
		||||
            itemView.setOnClickListener(v -> {
 | 
			
		||||
 | 
			
		||||
                    Context context = v.getContext();
 | 
			
		||||
                Context context = v.getContext();
 | 
			
		||||
 | 
			
		||||
                    Intent intent = new Intent(context, RepoDetailActivity.class);
 | 
			
		||||
                    intent.putExtra("repoFullName", fullName.getText().toString());
 | 
			
		||||
                Intent intent = new Intent(context, RepoDetailActivity.class);
 | 
			
		||||
                intent.putExtra("repoFullName", fullName.getText().toString());
 | 
			
		||||
 | 
			
		||||
                    TinyDB tinyDb = new TinyDB(context);
 | 
			
		||||
                    tinyDb.putString("repoFullName", fullName.getText().toString());
 | 
			
		||||
                    tinyDb.putString("repoType", repoType.getText().toString());
 | 
			
		||||
                    tinyDb.putBoolean("resumeIssues", true);
 | 
			
		||||
                    context.startActivity(intent);
 | 
			
		||||
                TinyDB tinyDb = new TinyDB(context);
 | 
			
		||||
                tinyDb.putString("repoFullName", fullName.getText().toString());
 | 
			
		||||
                tinyDb.putString("repoType", repoType.getText().toString());
 | 
			
		||||
                tinyDb.putBoolean("resumeIssues", true);
 | 
			
		||||
                context.startActivity(intent);
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            reposDropdownMenu.setOnClickListener(new View.OnClickListener() {
 | 
			
		||||
                @Override
 | 
			
		||||
                public void onClick(View v) {
 | 
			
		||||
            reposDropdownMenu.setOnClickListener(v -> {
 | 
			
		||||
 | 
			
		||||
                    final Context context = v.getContext();
 | 
			
		||||
                    Context context_ = new ContextThemeWrapper(context, R.style.AppThemeConfirmDialog);
 | 
			
		||||
                final Context context = v.getContext();
 | 
			
		||||
 | 
			
		||||
                    PopupMenu popupMenu = new PopupMenu(context, v);
 | 
			
		||||
                    popupMenu.inflate(R.menu.repo_dotted_list_menu);
 | 
			
		||||
                @SuppressLint("InflateParams")
 | 
			
		||||
                View view = LayoutInflater.from(context).inflate(R.layout.bottom_sheet_repository_in_list, null);
 | 
			
		||||
 | 
			
		||||
                    Object menuHelper;
 | 
			
		||||
                    Class[] argTypes;
 | 
			
		||||
                    try {
 | 
			
		||||
                TextView repoOpenInBrowser = view.findViewById(R.id.repoOpenInBrowser);
 | 
			
		||||
                TextView repoStargazers = view.findViewById(R.id.repoStargazers);
 | 
			
		||||
                TextView repoWatchers = view.findViewById(R.id.repoWatchers);
 | 
			
		||||
 | 
			
		||||
                        Field fMenuHelper = PopupMenu.class.getDeclaredField("mPopup");
 | 
			
		||||
                        fMenuHelper.setAccessible(true);
 | 
			
		||||
                        menuHelper = fMenuHelper.get(popupMenu);
 | 
			
		||||
                        argTypes = new Class[] { boolean.class };
 | 
			
		||||
                        menuHelper.getClass().getDeclaredMethod("setForceShowIcon",
 | 
			
		||||
                                argTypes).invoke(menuHelper, true);
 | 
			
		||||
                BottomSheetDialog dialog = new BottomSheetDialog(context);
 | 
			
		||||
                dialog.setContentView(view);
 | 
			
		||||
                dialog.show();
 | 
			
		||||
 | 
			
		||||
                    } catch (Exception e) {
 | 
			
		||||
                repoOpenInBrowser.setOnClickListener(openInBrowser -> {
 | 
			
		||||
 | 
			
		||||
                        popupMenu.show();
 | 
			
		||||
                        return;
 | 
			
		||||
                    Intent intentOpenInBrowser = new Intent(context, OpenRepoInBrowserActivity.class);
 | 
			
		||||
                    intentOpenInBrowser.putExtra("repoFullNameBrowser", fullName.getText());
 | 
			
		||||
                    context.startActivity(intentOpenInBrowser);
 | 
			
		||||
                    dialog.dismiss();
 | 
			
		||||
 | 
			
		||||
                    }
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
                    popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
 | 
			
		||||
                        @Override
 | 
			
		||||
                        public boolean onMenuItemClick(MenuItem item) {
 | 
			
		||||
                            switch (item.getItemId()) {
 | 
			
		||||
                                case R.id.repoStargazers:
 | 
			
		||||
                repoStargazers.setOnClickListener(openInBrowser -> {
 | 
			
		||||
 | 
			
		||||
                                    Intent intent = new Intent(context, RepoStargazersActivity.class);
 | 
			
		||||
                                    intent.putExtra("repoFullNameForStars", fullName.getText());
 | 
			
		||||
                                    context.startActivity(intent);
 | 
			
		||||
                                    break;
 | 
			
		||||
                    Intent intent = new Intent(context, RepoStargazersActivity.class);
 | 
			
		||||
                    intent.putExtra("repoFullNameForStars", fullName.getText());
 | 
			
		||||
                    context.startActivity(intent);
 | 
			
		||||
                    dialog.dismiss();
 | 
			
		||||
 | 
			
		||||
                                case R.id.repoWatchers:
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
                                    Intent intentW = new Intent(context, RepoWatchersActivity.class);
 | 
			
		||||
                                    intentW.putExtra("repoFullNameForWatchers", fullName.getText());
 | 
			
		||||
                                    context.startActivity(intentW);
 | 
			
		||||
                                    break;
 | 
			
		||||
                repoWatchers.setOnClickListener(openInBrowser -> {
 | 
			
		||||
 | 
			
		||||
                                case R.id.repoOpenInBrowser:
 | 
			
		||||
                    Intent intentW = new Intent(context, RepoWatchersActivity.class);
 | 
			
		||||
                    intentW.putExtra("repoFullNameForWatchers", fullName.getText());
 | 
			
		||||
                    context.startActivity(intentW);
 | 
			
		||||
                    dialog.dismiss();
 | 
			
		||||
 | 
			
		||||
                                    Intent intentOpenInBrowser = new Intent(context, OpenRepoInBrowserActivity.class);
 | 
			
		||||
                                    intentOpenInBrowser.putExtra("repoFullNameBrowser", fullName.getText());
 | 
			
		||||
                                    context.startActivity(intentOpenInBrowser);
 | 
			
		||||
                                    break;
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
                            }
 | 
			
		||||
                            return false;
 | 
			
		||||
                        }
 | 
			
		||||
                    });
 | 
			
		||||
 | 
			
		||||
                    popupMenu.show();
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										60
									
								
								app/src/main/res/layout/bottom_sheet_repository_in_list.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								app/src/main/res/layout/bottom_sheet_repository_in_list.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,60 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<LinearLayout
 | 
			
		||||
    xmlns:android="http://schemas.android.com/apk/res/android"
 | 
			
		||||
    android:layout_width="match_parent"
 | 
			
		||||
    android:layout_height="wrap_content"
 | 
			
		||||
    android:orientation="vertical"
 | 
			
		||||
    android:paddingBottom="8dp"
 | 
			
		||||
    android:background="?attr/primaryBackgroundColor"
 | 
			
		||||
    android:paddingTop="8dp">
 | 
			
		||||
 | 
			
		||||
    <androidx.core.widget.NestedScrollView
 | 
			
		||||
        android:layout_width="match_parent"
 | 
			
		||||
        android:layout_height="wrap_content">
 | 
			
		||||
 | 
			
		||||
        <LinearLayout
 | 
			
		||||
            android:layout_width="match_parent"
 | 
			
		||||
            android:orientation="vertical"
 | 
			
		||||
            android:layout_height="wrap_content">
 | 
			
		||||
 | 
			
		||||
            <TextView
 | 
			
		||||
                android:id="@+id/repoOpenInBrowser"
 | 
			
		||||
                android:layout_width="match_parent"
 | 
			
		||||
                android:layout_height="wrap_content"
 | 
			
		||||
                android:layout_gravity="center_vertical"
 | 
			
		||||
                android:text="@string/openWebRepo"
 | 
			
		||||
                android:drawableStart="@drawable/ic_open_in_browser"
 | 
			
		||||
                android:drawablePadding="24dp"
 | 
			
		||||
                android:textColor="?attr/primaryTextColor"
 | 
			
		||||
                android:textSize="16sp"
 | 
			
		||||
                android:padding="16dp" />
 | 
			
		||||
 | 
			
		||||
            <TextView
 | 
			
		||||
                android:id="@+id/repoStargazers"
 | 
			
		||||
                android:layout_width="match_parent"
 | 
			
		||||
                android:layout_height="wrap_content"
 | 
			
		||||
                android:layout_gravity="center_vertical"
 | 
			
		||||
                android:text="@string/repoStargazersInMenu"
 | 
			
		||||
                android:drawableStart="@drawable/ic_star"
 | 
			
		||||
                android:drawablePadding="24dp"
 | 
			
		||||
                android:textColor="?attr/primaryTextColor"
 | 
			
		||||
                android:textSize="16sp"
 | 
			
		||||
                android:padding="16dp" />
 | 
			
		||||
 | 
			
		||||
            <TextView
 | 
			
		||||
                android:id="@+id/repoWatchers"
 | 
			
		||||
                android:layout_width="match_parent"
 | 
			
		||||
                android:layout_height="wrap_content"
 | 
			
		||||
                android:layout_gravity="center_vertical"
 | 
			
		||||
                android:text="@string/repoWatchersInMenu"
 | 
			
		||||
                android:drawableStart="@drawable/ic_watchers"
 | 
			
		||||
                android:drawablePadding="24dp"
 | 
			
		||||
                android:textColor="?attr/primaryTextColor"
 | 
			
		||||
                android:textSize="16sp"
 | 
			
		||||
                android:padding="16dp" />
 | 
			
		||||
 | 
			
		||||
        </LinearLayout>
 | 
			
		||||
 | 
			
		||||
    </androidx.core.widget.NestedScrollView>
 | 
			
		||||
 | 
			
		||||
</LinearLayout>
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
 | 
			
		||||
 | 
			
		||||
    <item
 | 
			
		||||
        android:id="@+id/repoOpenInBrowser"
 | 
			
		||||
        android:icon="@drawable/ic_open_in_browser"
 | 
			
		||||
        android:title="@string/openWebRepo" />
 | 
			
		||||
 | 
			
		||||
    <item
 | 
			
		||||
        android:id="@+id/repoStargazers"
 | 
			
		||||
        android:icon="@drawable/ic_star"
 | 
			
		||||
        android:title="@string/repoStargazersInMenu" />
 | 
			
		||||
 | 
			
		||||
    <item
 | 
			
		||||
        android:id="@+id/repoWatchers"
 | 
			
		||||
        android:icon="@drawable/ic_watchers"
 | 
			
		||||
        android:title="@string/repoWatchersInMenu" />
 | 
			
		||||
 | 
			
		||||
</menu>
 | 
			
		||||
		Reference in New Issue
	
	Block a user