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

Merge branch 'extra-space' into fix-extra-space

# Conflicts:
#	app/src/main/res/layout/list_repositories.xml

fix margins and clean up

Adjusting margin to be consistent.

remove association

Fix org repos layout bug, cleanup layouts and adapters

Co-authored-by: opyale <opyale@noreply.gitea.io>
Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/514
Reviewed-by: opyale <opyale@noreply.gitea.io>
This commit is contained in:
M M Arif 2020-05-29 19:30:04 +00:00
parent 6654b6fb48
commit 014b06cc46
10 changed files with 62 additions and 494 deletions

View File

@ -192,7 +192,7 @@ public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<ExploreRepo
@Override @Override
public ExploreRepositoriesAdapter.ReposSearchViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 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); return new ExploreRepositoriesAdapter.ReposSearchViewHolder(v);
} }

View File

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

View File

@ -194,7 +194,7 @@ public class RepositoriesByOrgAdapter extends RecyclerView.Adapter<RepositoriesB
@NonNull @NonNull
@Override @Override
public RepositoriesByOrgAdapter.OrgReposViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 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); return new RepositoriesByOrgAdapter.OrgReposViewHolder(v);
} }

View File

@ -195,7 +195,7 @@ public class StarredReposListAdapter extends RecyclerView.Adapter<StarredReposLi
@NonNull @NonNull
@Override @Override
public StarredReposListAdapter.StarredReposViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 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); return new StarredReposListAdapter.StarredReposViewHolder(v);
} }

View File

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