Fix org repos layout bug, cleanup layouts and adapters #514

Merged
mmarif merged 5 commits from fix-extra-space into master 2020-05-29 19:30:24 +00:00
10 changed files with 62 additions and 494 deletions

View File

@ -192,7 +192,7 @@ public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<ExploreRepo
@Override
public ExploreRepositoriesAdapter.ReposSearchViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_repos, parent, false);
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_repositories, parent, false);
return new ExploreRepositoriesAdapter.ReposSearchViewHolder(v);
}

View File

@ -7,6 +7,7 @@ import android.graphics.Typeface;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.Filter;
import android.widget.Filterable;
import android.widget.ImageView;
@ -45,45 +46,48 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
static class MyReposViewHolder extends RecyclerView.ViewHolder {
private ImageView imageMy;
private TextView mTextView1My;
private TextView mTextView2My;
private TextView fullNameMy;
private ImageView repoPrivatePublicMy;
private TextView repoStarsMy;
private TextView repoForksMy;
private TextView repoOpenIssuesCountMy;
private ImageView imageAvatar;
private TextView repoName;
private TextView repoDescription;
private TextView repoFullName;
private ImageView repoPrivatePublic;
private TextView repoStars;
private TextView repoForks;
private TextView repoOpenIssuesCount;
private TextView repoType;
private CheckBox isRepoAdmin;
private MyReposViewHolder(View itemView) {
super(itemView);
mTextView1My = itemView.findViewById(R.id.repoNameMy);
mTextView2My = itemView.findViewById(R.id.repoDescriptionMy);
imageMy = itemView.findViewById(R.id.imageAvatarMy);
fullNameMy = itemView.findViewById(R.id.repoFullNameMy);
repoPrivatePublicMy = itemView.findViewById(R.id.imageRepoTypeMy);
repoStarsMy = itemView.findViewById(R.id.repoStarsMy);
repoForksMy = itemView.findViewById(R.id.repoForksMy);
repoOpenIssuesCountMy = itemView.findViewById(R.id.repoOpenIssuesCountMy);
repoName = itemView.findViewById(R.id.repoName);
repoDescription = itemView.findViewById(R.id.repoDescription);
imageAvatar = itemView.findViewById(R.id.imageAvatar);
repoFullName = itemView.findViewById(R.id.repoFullName);
repoPrivatePublic = itemView.findViewById(R.id.imageRepoType);
repoStars = itemView.findViewById(R.id.repoStars);
repoForks = itemView.findViewById(R.id.repoForks);
repoOpenIssuesCount = itemView.findViewById(R.id.repoOpenIssuesCount);
ImageView reposDropdownMenu = itemView.findViewById(R.id.reposDropdownMenu);
repoType = itemView.findViewById(R.id.repoType);
isRepoAdmin = itemView.findViewById(R.id.repoIsAdmin);
itemView.setOnClickListener(v -> {
Context context = v.getContext();
Intent intent = new Intent(context, RepoDetailActivity.class);
intent.putExtra("repoFullName", fullNameMy.getText().toString());
intent.putExtra("repoFullName", repoFullName.getText().toString());
TinyDB tinyDb = new TinyDB(context);
tinyDb.putString("repoFullName", fullNameMy.getText().toString());
tinyDb.putString("repoFullName", repoFullName.getText().toString());
tinyDb.putString("repoType", repoType.getText().toString());
//tinyDb.putBoolean("resumeIssues", true);
tinyDb.putBoolean("isRepoAdmin", isRepoAdmin.isChecked());
//store if user is watching this repo
{
final String instanceUrl = tinyDb.getString("instanceUrl");
String[] parts = fullNameMy.getText().toString().split("/");
String[] parts = repoFullName.getText().toString().split("/");
final String repoOwner = parts[0];
final String repoName = parts[1];
final String token = "token " + tinyDb.getString(tinyDb.getString("loginUid") + "-token");
@ -144,7 +148,7 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
TextView repoWatchers = view.findViewById(R.id.repoWatchers);
TextView bottomSheetHeader = view.findViewById(R.id.bottomSheetHeader);
bottomSheetHeader.setText(fullNameMy.getText());
bottomSheetHeader.setText(repoFullName.getText());
BottomSheetDialog dialog = new BottomSheetDialog(context);
dialog.setContentView(view);
dialog.show();
@ -152,7 +156,7 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
repoOpenInBrowser.setOnClickListener(openInBrowser -> {
Intent intentOpenInBrowser = new Intent(context, OpenRepoInBrowserActivity.class);
intentOpenInBrowser.putExtra("repoFullNameBrowser", fullNameMy.getText());
intentOpenInBrowser.putExtra("repoFullNameBrowser", repoFullName.getText());
context.startActivity(intentOpenInBrowser);
dialog.dismiss();
@ -161,7 +165,7 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
repoStargazers.setOnClickListener(stargazers -> {
Intent intent = new Intent(context, RepoStargazersActivity.class);
intent.putExtra("repoFullNameForStars", fullNameMy.getText());
intent.putExtra("repoFullNameForStars", repoFullName.getText());
context.startActivity(intent);
dialog.dismiss();
@ -170,7 +174,7 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
repoWatchers.setOnClickListener(watchers -> {
Intent intentW = new Intent(context, RepoWatchersActivity.class);
intentW.putExtra("repoFullNameForWatchers", fullNameMy.getText());
intentW.putExtra("repoFullNameForWatchers", repoFullName.getText());
context.startActivity(intentW);
dialog.dismiss();
@ -190,7 +194,7 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
@NonNull
@Override
public MyReposListAdapter.MyReposViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_my_repos, parent, false);
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_repositories, parent, false);
return new MyReposListAdapter.MyReposViewHolder(v);
}
@ -198,7 +202,7 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
public void onBindViewHolder(@NonNull MyReposListAdapter.MyReposViewHolder holder, int position) {
UserRepositories currentItem = reposList.get(position);
holder.mTextView2My.setVisibility(View.GONE);
holder.repoDescription.setVisibility(View.GONE);
ColorGenerator generator = ColorGenerator.MATERIAL;
int color = generator.getColor(currentItem.getName());
@ -216,32 +220,37 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
if (currentItem.getAvatar_url() != null) {
if (!currentItem.getAvatar_url().equals("")) {
PicassoService.getInstance(mCtx).get().load(currentItem.getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.imageMy);
PicassoService.getInstance(mCtx).get().load(currentItem.getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(holder.imageAvatar);
} else {
holder.imageMy.setImageDrawable(drawable);
holder.imageAvatar.setImageDrawable(drawable);
}
}
else {
holder.imageMy.setImageDrawable(drawable);
holder.imageAvatar.setImageDrawable(drawable);
}
holder.mTextView1My.setText(currentItem.getName());
holder.repoName.setText(currentItem.getName());
if (!currentItem.getDescription().equals("")) {
holder.mTextView2My.setVisibility(View.VISIBLE);
holder.mTextView2My.setText(currentItem.getDescription());
holder.repoDescription.setVisibility(View.VISIBLE);
holder.repoDescription.setText(currentItem.getDescription());
}
holder.fullNameMy.setText(currentItem.getFullname());
holder.repoFullName.setText(currentItem.getFullname());
if(currentItem.getPrivateFlag()) {
holder.repoPrivatePublicMy.setImageResource(R.drawable.ic_lock_bold);
holder.repoPrivatePublic.setImageResource(R.drawable.ic_lock_bold);
holder.repoType.setText(R.string.strPrivate);
}
else {
holder.repoPrivatePublicMy.setImageResource(R.drawable.ic_public);
holder.repoPrivatePublic.setImageResource(R.drawable.ic_public);
holder.repoType.setText(R.string.strPublic);
}
holder.repoStarsMy.setText(currentItem.getStars_count());
holder.repoForksMy.setText(currentItem.getForks_count());
holder.repoOpenIssuesCountMy.setText(currentItem.getOpen_issues_count());
holder.repoStars.setText(currentItem.getStars_count());
holder.repoForks.setText(currentItem.getForks_count());
holder.repoOpenIssuesCount.setText(currentItem.getOpen_issues_count());
if(holder.isRepoAdmin == null) {
holder.isRepoAdmin = new CheckBox(mCtx);
}
holder.isRepoAdmin.setChecked(currentItem.getPermissions().isAdmin());
}

View File

@ -199,7 +199,7 @@ public class ReposListAdapter extends RecyclerView.Adapter<ReposListAdapter.Repo
@Override
public ReposViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_repos, parent, false);
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_repositories, parent, false);
return new ReposViewHolder(v);
}

View File

@ -194,7 +194,7 @@ public class RepositoriesByOrgAdapter extends RecyclerView.Adapter<RepositoriesB
@NonNull
@Override
public RepositoriesByOrgAdapter.OrgReposViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_repositories_by_org, parent, false);
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_repositories, parent, false);
return new RepositoriesByOrgAdapter.OrgReposViewHolder(v);
}

View File

@ -195,7 +195,7 @@ public class StarredReposListAdapter extends RecyclerView.Adapter<StarredReposLi
@NonNull
@Override
public StarredReposListAdapter.StarredReposViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_starred_repos, parent, false);
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_repositories, parent, false);
return new StarredReposListAdapter.StarredReposViewHolder(v);
}

View File

@ -15,7 +15,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/primaryBackgroundColor"
android:padding="4dp"
android:scrollbars="vertical" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
@ -52,4 +51,4 @@
android:padding="@dimen/fab_padding"
android:contentDescription="@string/addNewContent" />
</RelativeLayout>
</RelativeLayout>

View File

@ -1,148 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" >
<TextView
android:id="@+id/repoType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible" />
<RelativeLayout
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayoutFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_marginTop="0dp"
android:fitsSystemWindows="true"
android:orientation="vertical"
android:padding="10dp"
tools:context=".activities.MainActivity">
<ImageView
android:id="@+id/imageAvatarMy"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginEnd="15dp"
android:contentDescription="@string/repoContentAvatar"
android:src="@drawable/ic_android" />
<LinearLayout
android:id="@+id/infoSection"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toEndOf="@+id/imageAvatarMy"
android:orientation="vertical">
<LinearLayout
android:id="@+id/frameRepoName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/repoNameMy"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".95"
android:layout_marginBottom="5dp"
android:text="@string/repoName"
android:textColor="?attr/primaryTextColor"
android:textSize="18sp" />
<ImageView
android:layout_weight=".05"
android:id="@+id/imageRepoTypeMy"
android:layout_width="10dp"
android:layout_height="20dp"
android:layout_gravity="end"
android:contentDescription="@string/privateAvatar"
android:src="@drawable/ic_lock_bold" />
</LinearLayout>
<TextView
android:id="@+id/repoFullNameMy"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="@string/repoFullname"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp" />
<TextView
android:id="@+id/repoDescriptionMy"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:text="@string/repoDescription"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
android:visibility="gone" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
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_open"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoWatchers"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp" />
<TextView
android:id="@+id/repoStarsMy"
android:layout_width="0dp"
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="?attr/primaryTextColor"
android:textSize="16sp" />
<TextView
android:id="@+id/repoForksMy"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_forks_24"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoWatchers"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp" />
<ImageView
android:id="@+id/reposDropdownMenu"
android:layout_width="0dp"
android:layout_weight=".10"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:scaleType="fitEnd"
android:src="@drawable/ic_dotted_menu_horizontal"
android:contentDescription="@string/menuContentDesc" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>

View File

@ -11,16 +11,12 @@
android:visibility="invisible" />
<RelativeLayout
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayoutFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="0dp"
android:fitsSystemWindows="true"
android:orientation="vertical"
android:layout_margin="10dp"
tools:context=".activities.MainActivity">
android:layout_margin="15dp"
android:orientation="vertical">
<ImageView
android:id="@+id/imageAvatar"
@ -47,18 +43,18 @@
android:id="@+id/repoName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".95"
android:layout_marginBottom="5dp"
android:layout_weight=".95"
android:text="@string/repoName"
android:textColor="?attr/primaryTextColor"
android:textSize="18sp" />
<ImageView
android:layout_weight=".05"
android:id="@+id/imageRepoType"
android:layout_width="10dp"
android:layout_height="20dp"
android:layout_gravity="end"
android:layout_weight=".05"
android:contentDescription="@string/privateAvatar"
android:src="@drawable/ic_lock_24dp" />
@ -95,18 +91,17 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:orientation="horizontal">
<TextView
android:id="@+id/repoOpenIssuesCount"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_issue_open"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoWatchers"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp" />
@ -115,11 +110,11 @@
android:id="@+id/repoStars"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical"
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="?attr/primaryTextColor"
android:textSize="14sp" />
@ -128,11 +123,11 @@
android:id="@+id/repoForks"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_forks_24"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoWatchers"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp" />
@ -140,12 +135,12 @@
<ImageView
android:id="@+id/reposDropdownMenu"
android:layout_width="0dp"
android:layout_weight=".10"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight=".10"
android:contentDescription="@string/menuContentDesc"
android:scaleType="fitEnd"
android:src="@drawable/ic_dotted_menu_horizontal"
android:contentDescription="@string/menuContentDesc" />
android:src="@drawable/ic_dotted_menu_horizontal" />
</LinearLayout>

View File

@ -1,144 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearLayoutFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="0dp"
android:fitsSystemWindows="true"
android:orientation="vertical"
android:layout_margin="10dp"
android:background="?attr/primaryBackgroundColor"
tools:context=".activities.MainActivity">
<TextView
android:id="@+id/repoType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible" />
<ImageView
android:id="@+id/imageAvatar"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginEnd="15dp"
android:contentDescription="@string/repoContentAvatar"
android:src="@drawable/ic_android" />
<LinearLayout
android:id="@+id/infoSection"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toEndOf="@+id/imageAvatar"
android:orientation="vertical">
<LinearLayout
android:id="@+id/frameRepoName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/repoName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".95"
android:layout_marginBottom="5dp"
android:text="@string/repoName"
android:textColor="?attr/primaryTextColor"
android:textSize="18sp" />
<ImageView
android:layout_weight=".05"
android:id="@+id/imageRepoType"
android:layout_width="10dp"
android:layout_height="20dp"
android:layout_gravity="end"
android:contentDescription="@string/privateAvatar"
android:src="@drawable/ic_lock_24dp" />
</LinearLayout>
<TextView
android:id="@+id/repoFullName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="@string/repoFullname"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp" />
<TextView
android:id="@+id/repoDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:text="@string/repoDescription"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
android:visibility="gone" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
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_open"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoWatchers"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp" />
<TextView
android:id="@+id/repoStars"
android:layout_width="0dp"
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="?attr/primaryTextColor"
android:textSize="14sp" />
<TextView
android:id="@+id/repoForks"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_forks_24"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoWatchers"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp" />
<ImageView
android:id="@+id/reposDropdownMenu"
android:layout_width="0dp"
android:layout_weight=".10"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:scaleType="fitEnd"
android:src="@drawable/ic_dotted_menu_horizontal"
android:contentDescription="@string/menuContentDesc" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>

View File

@ -1,143 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearLayoutFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="0dp"
android:fitsSystemWindows="true"
android:orientation="vertical"
android:padding="10dp"
android:background="?attr/primaryBackgroundColor"
tools:context=".activities.MainActivity">
<TextView
android:id="@+id/repoType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible" />
<ImageView
android:id="@+id/imageAvatar"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginEnd="15dp"
android:contentDescription="@string/repoContentAvatar"
android:src="@drawable/ic_android" />
<LinearLayout
android:id="@+id/infoSection"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toEndOf="@+id/imageAvatar"
android:orientation="vertical">
<LinearLayout
android:id="@+id/frameRepoName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/repoName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".95"
android:layout_marginBottom="5dp"
android:text="@string/repoName"
android:textColor="?attr/primaryTextColor"
android:textSize="18sp" />
<ImageView
android:layout_weight=".05"
android:id="@+id/imageRepoType"
android:layout_width="10dp"
android:layout_height="20dp"
android:layout_gravity="end"
android:contentDescription="@string/privateAvatar"
android:src="@drawable/ic_lock_24dp" />
</LinearLayout>
<TextView
android:id="@+id/repoFullName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="@string/repoFullname"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp" />
<TextView
android:id="@+id/repoDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:text="@string/repoDescription"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
android:visibility="gone" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
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_open"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoWatchers"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp" />
<TextView
android:id="@+id/repoStars"
android:layout_width="0dp"
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="?attr/primaryTextColor"
android:textSize="14sp" />
<TextView
android:id="@+id/repoForks"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_forks_24"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:text="@string/repoWatchers"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp" />
<ImageView
android:id="@+id/reposDropdownMenu"
android:layout_width="0dp"
android:layout_weight=".10"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:scaleType="fitEnd"
android:src="@drawable/ic_dotted_menu_horizontal"
android:contentDescription="@string/menuContentDesc" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>