Merge branch '25-list-repo-stargazers' of mmarif/GitNex into master

This commit is contained in:
M M Arif 2019-09-13 16:03:29 +00:00 committed by Gitea
commit 6866154714
23 changed files with 743 additions and 72 deletions

View File

@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.mian.gitnex">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
@ -13,7 +13,10 @@
android:roundIcon="@mipmap/app_logo_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".activities.AdminGetUsersActivity"></activity>
<activity
android:name=".activities.RepoStargazersActivity"
android:theme="@style/AppTheme.NoActionBar"></activity>
<activity android:name=".activities.AdminGetUsersActivity" />
<activity
android:name=".activities.AddRemoveAssigneesActivity"
android:theme="@style/Theme.AppCompat.Light.Dialog" />

View File

@ -330,6 +330,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
if (response.code() == 200) {
assert userDetails != null;
if(userDetails.getIs_admin() != null) {
tinyDb.putBoolean("userIsAdmin", userDetails.getIs_admin());
}
tinyDb.putString("userLogin", userDetails.getLogin());
tinyDb.putInt("userId", userDetails.getId());
if(!userDetails.getFullname().equals("")) {

View File

@ -3,9 +3,8 @@ package org.mian.gitnex.activities;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProviders;
import androidx.lifecycle.ViewModelProvider;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.GridView;
import android.widget.ImageView;
@ -63,7 +62,7 @@ public class OrgTeamMembersActivity extends AppCompatActivity {
}
getIntent().getStringExtra("teamId");
Log.i("teamId", getIntent().getStringExtra("teamId"));
//Log.i("teamId", getIntent().getStringExtra("teamId"));
fetchDataAsync(instanceUrl, Authorization.returnAuthentication(getApplicationContext(), loginUid, instanceToken), Integer.valueOf(teamId));
@ -71,7 +70,7 @@ public class OrgTeamMembersActivity extends AppCompatActivity {
private void fetchDataAsync(String instanceUrl, String instanceToken, int teamId) {
TeamMembersByOrgViewModel teamMembersModel = ViewModelProviders.of(this).get(TeamMembersByOrgViewModel.class);
TeamMembersByOrgViewModel teamMembersModel = new ViewModelProvider(this).get(TeamMembersByOrgViewModel.class);
teamMembersModel.getMembersByOrgList(instanceUrl, instanceToken, teamId).observe(this, new Observer<List<UserInfo>>() {
@Override

View File

@ -0,0 +1,96 @@
package org.mian.gitnex.activities;
import android.content.Context;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import android.view.View;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import org.mian.gitnex.R;
import org.mian.gitnex.adapters.RepoStargazersAdapter;
import org.mian.gitnex.helpers.Authorization;
import org.mian.gitnex.models.UserInfo;
import org.mian.gitnex.util.TinyDB;
import org.mian.gitnex.viewmodels.RepoStargazersViewModel;
import java.util.List;
/**
* Author M M Arif
*/
public class RepoStargazersActivity extends AppCompatActivity {
private TextView noDataStargazers;
private View.OnClickListener onClickListener;
private RepoStargazersAdapter adapter;
private GridView mGridView;
private ProgressBar mProgressBar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_repo_stargazers);
TinyDB tinyDb = new TinyDB(getApplicationContext());
final String instanceUrl = tinyDb.getString("instanceUrl");
final String loginUid = tinyDb.getString("loginUid");
final String instanceToken = "token " + tinyDb.getString(loginUid + "-token");
ImageView closeActivity = findViewById(R.id.close);
TextView toolbarTitle = findViewById(R.id.toolbar_title);
noDataStargazers = findViewById(R.id.noDataStargazers);
mGridView = findViewById(R.id.gridView);
mProgressBar = findViewById(R.id.progress_bar);
String repoFullNameForStars = getIntent().getStringExtra("repoFullNameForStars");
String[] parts = repoFullNameForStars.split("/");
final String repoOwner = parts[0];
final String repoName = parts[1];
initCloseListener();
closeActivity.setOnClickListener(onClickListener);
toolbarTitle.setText(R.string.repoStargazersInMenu);
fetchDataAsync(instanceUrl, Authorization.returnAuthentication(getApplicationContext(), loginUid, instanceToken), repoOwner, repoName);
}
private void fetchDataAsync(String instanceUrl, String instanceToken, String repoOwner, String repoName) {
RepoStargazersViewModel repoStargazersModel = new ViewModelProvider(this).get(RepoStargazersViewModel.class);
repoStargazersModel.getRepoStargazers(instanceUrl, instanceToken, repoOwner, repoName).observe(this, new Observer<List<UserInfo>>() {
@Override
public void onChanged(@Nullable List<UserInfo> stargazersListMain) {
adapter = new RepoStargazersAdapter(getApplicationContext(), stargazersListMain);
if(adapter.getCount() > 0) {
mGridView.setAdapter(adapter);
noDataStargazers.setVisibility(View.GONE);
}
else {
adapter.notifyDataSetChanged();
mGridView.setAdapter(adapter);
noDataStargazers.setVisibility(View.VISIBLE);
}
mProgressBar.setVisibility(View.GONE);
}
});
}
private void initCloseListener() {
onClickListener = new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
};
}
}

View File

@ -4,6 +4,7 @@ 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;
@ -14,11 +15,15 @@ import com.amulyakhare.textdrawable.TextDrawable;
import com.amulyakhare.textdrawable.util.ColorGenerator;
import org.mian.gitnex.R;
import org.mian.gitnex.activities.RepoDetailActivity;
import org.mian.gitnex.activities.RepoStargazersActivity;
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;
/**
@ -52,6 +57,7 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
repoStarsMy = itemView.findViewById(R.id.repoStarsMy);
repoWatchersMy = itemView.findViewById(R.id.repoWatchersMy);
repoOpenIssuesCountMy = itemView.findViewById(R.id.repoOpenIssuesCountMy);
ImageView reposDropdownMenu = itemView.findViewById(R.id.reposDropdownMenu);
itemView.setOnClickListener(new View.OnClickListener() {
@Override
@ -70,6 +76,59 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
}
});
reposDropdownMenu.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final Context context = v.getContext();
Context context_ = new ContextThemeWrapper(context, R.style.popupMenuStyle);
PopupMenu popupMenu = new PopupMenu(context_, v);
popupMenu.inflate(R.menu.repo_dotted_list_menu);
Object menuHelper;
Class[] argTypes;
try {
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);
} catch (Exception e) {
popupMenu.show();
return;
}
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
switch (item.getItemId()) {
case R.id.repoStargazers:
Intent intent = new Intent(context, RepoStargazersActivity.class);
intent.putExtra("repoFullNameForStars", fullNameMy.getText());
context.startActivity(intent);
break;
case R.id.repoWatchers:
break;
}
return false;
}
});
popupMenu.show();
}
});
}
}

View File

@ -0,0 +1,91 @@
package org.mian.gitnex.adapters;
import android.annotation.SuppressLint;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.squareup.picasso.Picasso;
import org.mian.gitnex.R;
import org.mian.gitnex.helpers.RoundedTransformation;
import org.mian.gitnex.models.UserInfo;
import java.util.List;
/**
* Author M M Arif
*/
public class RepoStargazersAdapter extends BaseAdapter {
private List<UserInfo> stargazersList;
private Context mCtx;
private class ViewHolder {
private ImageView memberAvatar;
private TextView memberName;
ViewHolder(View v) {
memberAvatar = v.findViewById(R.id.memberAvatar);
memberName = v.findViewById(R.id.memberName);
}
}
public RepoStargazersAdapter(Context mCtx, List<UserInfo> membersListMain) {
this.mCtx = mCtx;
this.stargazersList = membersListMain;
}
@Override
public int getCount() {
return stargazersList.size();
}
@Override
public Object getItem(int position) {
return null;
}
@Override
public long getItemId(int position) {
return 0;
}
@SuppressLint("InflateParams")
@Override
public View getView(int position, View finalView, ViewGroup parent) {
RepoStargazersAdapter.ViewHolder viewHolder;
if (finalView == null) {
finalView = LayoutInflater.from(mCtx).inflate(R.layout.repo_stargazers_list, null);
viewHolder = new RepoStargazersAdapter.ViewHolder(finalView);
finalView.setTag(viewHolder);
}
else {
viewHolder = (RepoStargazersAdapter.ViewHolder) finalView.getTag();
}
initData(viewHolder, position);
return finalView;
}
private void initData(RepoStargazersAdapter.ViewHolder viewHolder, int position) {
UserInfo currentItem = stargazersList.get(position);
Picasso.get().load(currentItem.getAvatar()).transform(new RoundedTransformation(100, 0)).resize(200, 200).centerCrop().into(viewHolder.memberAvatar);
if(!currentItem.getFullname().equals("")) {
viewHolder.memberName.setText(currentItem.getFullname());
}
else {
viewHolder.memberName.setText(currentItem.getLogin());
}
}
}

View File

@ -4,8 +4,11 @@ import android.content.Context;
import android.content.Intent;
import android.graphics.Typeface;
import androidx.annotation.NonNull;
import androidx.appcompat.view.ContextThemeWrapper;
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,8 +19,10 @@ import com.amulyakhare.textdrawable.TextDrawable;
import com.amulyakhare.textdrawable.util.ColorGenerator;
import org.mian.gitnex.R;
import org.mian.gitnex.activities.RepoDetailActivity;
import org.mian.gitnex.activities.RepoStargazersActivity;
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;
@ -43,6 +48,7 @@ public class ReposListAdapter extends RecyclerView.Adapter<ReposListAdapter.Repo
private TextView repoOpenIssuesCount;
private ReposViewHolder(View itemView) {
super(itemView);
mTextView1 = itemView.findViewById(R.id.repoName);
mTextView2 = itemView.findViewById(R.id.repoDescription);
@ -52,13 +58,14 @@ public class ReposListAdapter extends RecyclerView.Adapter<ReposListAdapter.Repo
repoStars = itemView.findViewById(R.id.repoStars);
repoWatchers = itemView.findViewById(R.id.repoWatchers);
repoOpenIssuesCount = itemView.findViewById(R.id.repoOpenIssuesCount);
ImageView reposDropdownMenu = itemView.findViewById(R.id.reposDropdownMenu);
itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Context context = v.getContext();
TextView repoFullName = (TextView) v.findViewById(R.id.repoFullName);
TextView repoFullName = v.findViewById(R.id.repoFullName);
Intent intent = new Intent(context, RepoDetailActivity.class);
intent.putExtra("repoFullName", repoFullName.getText().toString());
@ -70,6 +77,60 @@ public class ReposListAdapter extends RecyclerView.Adapter<ReposListAdapter.Repo
}
});
reposDropdownMenu.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final Context context = v.getContext();
Context context_ = new ContextThemeWrapper(context, R.style.popupMenuStyle);
PopupMenu popupMenu = new PopupMenu(context_, v);
popupMenu.inflate(R.menu.repo_dotted_list_menu);
Object menuHelper;
Class[] argTypes;
try {
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);
} catch (Exception e) {
popupMenu.show();
return;
}
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
switch (item.getItemId()) {
case R.id.repoStargazers:
Intent intent = new Intent(context, RepoStargazersActivity.class);
intent.putExtra("repoFullNameForStars", fullName.getText());
context.startActivity(intent);
break;
case R.id.repoWatchers:
break;
}
return false;
}
});
popupMenu.show();
}
});
}
}

View File

@ -4,6 +4,7 @@ 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;
@ -14,11 +15,15 @@ import com.amulyakhare.textdrawable.TextDrawable;
import com.amulyakhare.textdrawable.util.ColorGenerator;
import org.mian.gitnex.R;
import org.mian.gitnex.activities.RepoDetailActivity;
import org.mian.gitnex.activities.RepoStargazersActivity;
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;
/**
@ -52,6 +57,7 @@ public class RepositoriesByOrgAdapter extends RecyclerView.Adapter<RepositoriesB
repoStars = itemView.findViewById(R.id.repoStars);
repoWatchers = itemView.findViewById(R.id.repoWatchers);
repoOpenIssuesCount = itemView.findViewById(R.id.repoOpenIssuesCount);
ImageView reposDropdownMenu = itemView.findViewById(R.id.reposDropdownMenu);
itemView.setOnClickListener(new View.OnClickListener() {
@Override
@ -70,6 +76,59 @@ public class RepositoriesByOrgAdapter extends RecyclerView.Adapter<RepositoriesB
}
});
reposDropdownMenu.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final Context context = v.getContext();
Context context_ = new ContextThemeWrapper(context, R.style.popupMenuStyle);
PopupMenu popupMenu = new PopupMenu(context_, v);
popupMenu.inflate(R.menu.repo_dotted_list_menu);
Object menuHelper;
Class[] argTypes;
try {
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);
} catch (Exception e) {
popupMenu.show();
return;
}
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
switch (item.getItemId()) {
case R.id.repoStargazers:
Intent intent = new Intent(context, RepoStargazersActivity.class);
intent.putExtra("repoFullNameForStars", fullName.getText());
context.startActivity(intent);
break;
case R.id.repoWatchers:
break;
}
return false;
}
});
popupMenu.show();
}
});
}
}

View File

@ -4,6 +4,7 @@ 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;
@ -14,11 +15,15 @@ import com.amulyakhare.textdrawable.TextDrawable;
import com.amulyakhare.textdrawable.util.ColorGenerator;
import org.mian.gitnex.R;
import org.mian.gitnex.activities.RepoDetailActivity;
import org.mian.gitnex.activities.RepoStargazersActivity;
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;
/**
@ -52,6 +57,7 @@ public class StarredReposListAdapter extends RecyclerView.Adapter<StarredReposLi
repoStars = itemView.findViewById(R.id.repoStars);
repoWatchers = itemView.findViewById(R.id.repoWatchers);
repoOpenIssuesCount = itemView.findViewById(R.id.repoOpenIssuesCount);
ImageView reposDropdownMenu = itemView.findViewById(R.id.reposDropdownMenu);
itemView.setOnClickListener(new View.OnClickListener() {
@Override
@ -70,6 +76,59 @@ public class StarredReposListAdapter extends RecyclerView.Adapter<StarredReposLi
}
});
reposDropdownMenu.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final Context context = v.getContext();
Context context_ = new ContextThemeWrapper(context, R.style.popupMenuStyle);
PopupMenu popupMenu = new PopupMenu(context_, v);
popupMenu.inflate(R.menu.repo_dotted_list_menu);
Object menuHelper;
Class[] argTypes;
try {
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);
} catch (Exception e) {
popupMenu.show();
return;
}
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
switch (item.getItemId()) {
case R.id.repoStargazers:
Intent intent = new Intent(context, RepoStargazersActivity.class);
intent.putExtra("repoFullNameForStars", fullName.getText());
context.startActivity(intent);
break;
case R.id.repoWatchers:
break;
}
return false;
}
});
popupMenu.show();
}
});
}
}

View File

@ -204,4 +204,7 @@ public interface ApiInterface {
@GET("admin/users") // get all users
Call<List<UserInfo>> adminGetUsers(@Header("Authorization") String token);
@GET("repos/{owner}/{repo}/stargazers") // get all repo stars
Call<List<UserInfo>> getRepoStargazers(@Header("Authorization") String token, @Path("owner") String ownerName, @Path("repo") String repoName);
}

View File

@ -0,0 +1,60 @@
package org.mian.gitnex.viewmodels;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
import org.mian.gitnex.clients.RetrofitClient;
import org.mian.gitnex.models.UserInfo;
import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
/**
* Author M M Arif
*/
public class RepoStargazersViewModel extends ViewModel {
private static MutableLiveData<List<UserInfo>> stargazersList;
public LiveData<List<UserInfo>> getRepoStargazers(String instanceUrl, String token, String repoOwner, String repoName) {
stargazersList = new MutableLiveData<>();
loadRepoStargazers(instanceUrl, token, repoOwner, repoName);
return stargazersList;
}
public static void loadRepoStargazers(String instanceUrl, String token, String repoOwner, String repoName) {
Call<List<UserInfo>> call = RetrofitClient
.getInstance(instanceUrl)
.getApiInterface()
.getRepoStargazers(token, repoOwner, repoName);
call.enqueue(new Callback<List<UserInfo>>() {
@Override
public void onResponse(@NonNull Call<List<UserInfo>> call, @NonNull Response<List<UserInfo>> response) {
if(response.isSuccessful()) {
if(response.code() == 200) {
stargazersList.postValue(response.body());
}
}
}
@Override
public void onFailure(@NonNull Call<List<UserInfo>> call, Throwable t) {
Log.i("onFailure", t.toString());
}
});
}
}

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:orientation="vertical">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
tools:ignore="UnusedAttribute">
<ImageView
android:id="@+id/close"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginRight="15dp"
android:layout_marginLeft="15dp"
android:gravity="center_vertical"
android:contentDescription="@string/close"
android:src="@drawable/ic_close" />
<TextView
android:id="@+id/toolbar_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textColor="@color/white"
android:maxLines="1"
android:textSize="20sp" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout>
<GridView
android:id="@+id/gridView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:horizontalSpacing="10dp"
android:numColumns="4"
android:columnWidth="80dp"
android:stretchMode="columnWidth"
android:gravity="center"/>
<TextView
android:id="@+id/noDataStargazers"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="15dp"
android:gravity="center"
android:text="@string/noDataFound"
android:textColor="@color/white"
android:textSize="20sp"
android:visibility="gone" />
<ProgressBar
android:id="@+id/progress_bar"
style="@style/Base.Widget.AppCompat.ProgressBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="true"
android:visibility="visible" />
</LinearLayout>

View File

@ -85,13 +85,28 @@
android:layout_marginBottom="8dp"
android:orientation="horizontal">
<TextView
android:id="@+id/repoOpenIssuesCountMy"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_issue_comments"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoWatchers"
android:textColor="@color/colorWhite"
android:textSize="16sp" />
<TextView
android:id="@+id/repoStarsMy"
android:layout_width="0dp"
android:layout_height="24dp"
android:layout_height="20dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_star"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoStars"
android:textColor="@color/colorWhite"
android:textSize="16sp" />
@ -99,30 +114,25 @@
<TextView
android:id="@+id/repoWatchersMy"
android:layout_width="0dp"
android:layout_height="24dp"
android:layout_height="20dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_watchers"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoWatchers"
android:textColor="@color/colorWhite"
android:textSize="16sp" />
<TextView
android:id="@+id/repoOpenIssuesCountMy"
<ImageView
android:id="@+id/reposDropdownMenu"
android:layout_width="0dp"
android:layout_height="24dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_comment"
android:drawablePadding="06dp"
android:text="@string/repoWatchers"
android:textColor="@color/colorWhite"
android:textSize="16sp" />
<TextView
android:id="@+id/repoSpace"
android:layout_width="wrap_content"
android:layout_weight=".10"
android:layout_height="wrap_content"
android:layout_weight=".25" />
android:layout_gravity="end"
android:scaleType="fitEnd"
android:src="@drawable/ic_dotted_menu_horizontal"
android:contentDescription="@string/menuContentDesc" />
</LinearLayout>

View File

@ -38,7 +38,7 @@
android:height="16dp"
android:layout_marginEnd="15dp"
android:layout_below="@+id/assigneeAvatar"
android:drawableTop="@drawable/ic_issue_comments"
android:drawableTop="@drawable/ic_comment"
android:gravity="center"
android:textColor="@color/colorWhite"
android:textSize="14sp" />

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridViewData"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:orientation="vertical">
<ImageView
android:id="@+id/memberAvatar"
android:layout_width="match_parent"
android:layout_height="110dp"
android:contentDescription="@string/starMember"
android:src="@drawable/ic_person_filled" />
<TextView
android:id="@+id/memberName"
android:layout_width="match_parent"
android:layout_height="60dp"
android:gravity="top|center_horizontal"
android:layout_marginTop="1dp"
android:text="@string/starMember"
android:textSize="14sp"
android:textColor="@color/white" />
</LinearLayout>

View File

@ -85,13 +85,28 @@
android:layout_marginBottom="8dp"
android:orientation="horizontal">
<TextView
android:id="@+id/repoOpenIssuesCount"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_issue_comments"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoWatchers"
android:textColor="@color/colorWhite"
android:textSize="14sp" />
<TextView
android:id="@+id/repoStars"
android:layout_width="0dp"
android:layout_height="24dp"
android:layout_height="20dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_star"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoStars"
android:textColor="@color/colorWhite"
android:textSize="14sp" />
@ -99,30 +114,25 @@
<TextView
android:id="@+id/repoWatchers"
android:layout_width="0dp"
android:layout_height="24dp"
android:layout_height="20dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_watchers"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoWatchers"
android:textColor="@color/colorWhite"
android:textSize="14sp" />
<TextView
android:id="@+id/repoOpenIssuesCount"
<ImageView
android:id="@+id/reposDropdownMenu"
android:layout_width="0dp"
android:layout_height="24dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_comment"
android:drawablePadding="06dp"
android:text="@string/repoWatchers"
android:textColor="@color/colorWhite"
android:textSize="14sp" />
<TextView
android:id="@+id/repoSpace"
android:layout_width="wrap_content"
android:layout_weight=".10"
android:layout_height="wrap_content"
android:layout_weight=".25" />
android:layout_gravity="end"
android:scaleType="fitEnd"
android:src="@drawable/ic_dotted_menu_horizontal"
android:contentDescription="@string/menuContentDesc" />
</LinearLayout>

View File

@ -85,13 +85,28 @@
android:layout_marginBottom="8dp"
android:orientation="horizontal">
<TextView
android:id="@+id/repoOpenIssuesCount"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_issue_comments"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoWatchers"
android:textColor="@color/colorWhite"
android:textSize="14sp" />
<TextView
android:id="@+id/repoStars"
android:layout_width="0dp"
android:layout_height="24dp"
android:layout_height="20dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_star"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoStars"
android:textColor="@color/colorWhite"
android:textSize="14sp" />
@ -99,30 +114,25 @@
<TextView
android:id="@+id/repoWatchers"
android:layout_width="0dp"
android:layout_height="24dp"
android:layout_height="20dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_watchers"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoWatchers"
android:textColor="@color/colorWhite"
android:textSize="14sp" />
<TextView
android:id="@+id/repoOpenIssuesCount"
<ImageView
android:id="@+id/reposDropdownMenu"
android:layout_width="0dp"
android:layout_height="24dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_comment"
android:drawablePadding="06dp"
android:text="@string/repoWatchers"
android:textColor="@color/colorWhite"
android:textSize="14sp" />
<TextView
android:id="@+id/repoSpace"
android:layout_width="wrap_content"
android:layout_weight=".10"
android:layout_height="wrap_content"
android:layout_weight=".25" />
android:layout_gravity="end"
android:scaleType="fitEnd"
android:src="@drawable/ic_dotted_menu_horizontal"
android:contentDescription="@string/menuContentDesc" />
</LinearLayout>

View File

@ -85,13 +85,28 @@
android:layout_marginBottom="8dp"
android:orientation="horizontal">
<TextView
android:id="@+id/repoOpenIssuesCount"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_issue_comments"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoWatchers"
android:textColor="@color/colorWhite"
android:textSize="14sp" />
<TextView
android:id="@+id/repoStars"
android:layout_width="0dp"
android:layout_height="24dp"
android:layout_height="20dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_star"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoStars"
android:textColor="@color/colorWhite"
android:textSize="14sp" />
@ -99,30 +114,25 @@
<TextView
android:id="@+id/repoWatchers"
android:layout_width="0dp"
android:layout_height="24dp"
android:layout_height="20dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_watchers"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoWatchers"
android:textColor="@color/colorWhite"
android:textSize="14sp" />
<TextView
android:id="@+id/repoOpenIssuesCount"
<ImageView
android:id="@+id/reposDropdownMenu"
android:layout_width="0dp"
android:layout_height="24dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_comment"
android:drawablePadding="06dp"
android:text="@string/repoWatchers"
android:textColor="@color/colorWhite"
android:textSize="14sp" />
<TextView
android:id="@+id/repoSpace"
android:layout_width="wrap_content"
android:layout_weight=".10"
android:layout_height="wrap_content"
android:layout_weight=".25" />
android:layout_gravity="end"
android:scaleType="fitEnd"
android:src="@drawable/ic_dotted_menu_horizontal"
android:contentDescription="@string/menuContentDesc" />
</LinearLayout>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<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>

View File

@ -397,6 +397,12 @@
<string name="loginOTP">OTP Code (Optional)</string>
<string name="otpMessage">Gebe den otp code ein wenn 2FA eingeschaltet ist</string>
<string name="repoStargazersInMenu">Stargazers</string>
<string name="repoWatchersInMenu">Watchers</string>
<string name="noDataStargazers">No stars found</string>
<string name="noDataWatchers">No watchers found</string>
<string name="starMember">Star</string>
<!-- generic copy -->
<string name="okButton">OK</string>
<string name="doneButton">Fertig</string>

View File

@ -397,6 +397,12 @@
<string name="loginOTP">OTP Code (Optional)</string>
<string name="otpMessage">Enter the otp code if 2FA is enabled</string>
<string name="repoStargazersInMenu">Stargazers</string>
<string name="repoWatchersInMenu">Watchers</string>
<string name="noDataStargazers">No stars found</string>
<string name="noDataWatchers">No watchers found</string>
<string name="starMember">Star</string>
<!-- generic copy -->
<string name="okButton">OK</string>
<string name="doneButton">Done</string>

View File

@ -397,6 +397,12 @@
<string name="loginOTP">OTP Code (Optional)</string>
<string name="otpMessage">Enter the otp code if 2FA is enabled</string>
<string name="repoStargazersInMenu">Stargazers</string>
<string name="repoWatchersInMenu">Watchers</string>
<string name="noDataStargazers">No stars found</string>
<string name="noDataWatchers">No watchers found</string>
<string name="starMember">Star</string>
<!-- generic copy -->
<string name="okButton">OK</string>
<string name="doneButton">Готово</string>

View File

@ -433,6 +433,12 @@
<string name="loginOTP">OTP Code (Optional)</string>
<string name="otpMessage">Enter the otp code if 2FA is enabled</string>
<string name="repoStargazersInMenu">Stargazers</string>
<string name="repoWatchersInMenu">Watchers</string>
<string name="noDataStargazers">No stars found</string>
<string name="noDataWatchers">No watchers found</string>
<string name="starMember">Star</string>
<!-- generic copy -->
<string name="okButton">OK</string>
<string name="doneButton">Done</string>