Improving design of "Repository Meta" #362

Merged
mmarif merged 24 commits from :details-design into master 2020-04-07 21:17:15 +00:00
2 changed files with 33 additions and 11 deletions
Showing only changes of commit 56e22c3764 - Show all commits

View File

@ -70,6 +70,7 @@ public class RepoInfoFragment extends Fragment {
private TextView repoMetaDescription;
private TextView repoMetaCommits;
private TextView repoMetaPullRequests;
private TextView repoMetaForks;
private TextView repoMetaSize;
private TextView repoFileContents;
private LinearLayout repoMetaFrame;
@ -122,6 +123,7 @@ public class RepoInfoFragment extends Fragment {
repoMetaDescription = v.findViewById(R.id.repoMetaDescription);
repoMetaCommits = v.findViewById(R.id.repoMetaCommits);
repoMetaPullRequests = v.findViewById(R.id.repoMetaPullRequests);
repoMetaForks = v.findViewById(R.id.repoMetaForks);
repoMetaSize = v.findViewById(R.id.repoMetaSize);
repoFileContents = v.findViewById(R.id.repoFileContents);
repoMetaFrame = v.findViewById(R.id.repoMetaFrame);
@ -225,8 +227,9 @@ public class RepoInfoFragment extends Fragment {
assert repoInfo != null;
repoMetaName.setText(repoInfo.getName());
repoMetaDescription.setText(repoInfo.getDescription());
repoMetaCommits.setText("20");
repoMetaPullRequests.setText("20");
repoMetaCommits.setText("20"); // To be implemented
repoMetaPullRequests.setText("20"); // To be implemented
repoMetaForks.setText(repoInfo.getForks_count());
repoMetaSize.setText(AppUtil.formatFileSize(repoInfo.getSize()));
if(repoInfo.getHas_issues() != null) {

View File

@ -81,6 +81,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:baselineAligned="false"
android:orientation="horizontal">
<LinearLayout
@ -91,11 +92,10 @@
android:orientation="vertical">
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_info_outline_24dp"
android:contentDescription="TODO" />
android:contentDescription="TODO"
app:srcCompat="@drawable/ic_info_outline_24dp" />
<TextView
android:id="@+id/repoMetaCommits"
@ -113,11 +113,10 @@
android:orientation="vertical">
<ImageView
android:id="@+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_merge"
android:contentDescription="TODO" />
android:contentDescription="TODO"
app:srcCompat="@drawable/ic_merge" />
<TextView
android:id="@+id/repoMetaPullRequests"
@ -135,11 +134,31 @@
android:orientation="vertical">
<ImageView
android:id="@+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_file_download_24dp"
android:contentDescription="TODO" />
android:contentDescription="TODO"
app:srcCompat="@drawable/ic_forks_24" />
<TextView
android:id="@+id/repoMetaForks"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="TODO"
app:srcCompat="@drawable/ic_file_download_24dp" />
<TextView
android:id="@+id/repoMetaSize"