diff --git a/README.md b/README.md
index 6b184e38..d7203b79 100644
--- a/README.md
+++ b/README.md
@@ -87,5 +87,6 @@ Open source libraries
- Droidsonroids.gif/android-gif-drawable
- Barteksc/AndroidPdfViewer
- Ge0rg/MemorizingTrustManager
+- Dimezis/BlurView
[Follow me on Fediverse - mastodon.social/@mmarif](https://mastodon.social/@mmarif)
diff --git a/app/build.gradle b/app/build.gradle
index e4a20a3d..c30b6478 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -41,8 +41,8 @@ dependencies {
def acra = "5.5.0"
implementation fileTree(include: ['*.jar'], dir: 'libs')
- implementation "androidx.appcompat:appcompat:1.2.0-rc01"
- implementation "com.google.android.material:material:1.2.0-beta01"
+ implementation "androidx.appcompat:appcompat:1.3.0-alpha01"
+ implementation "com.google.android.material:material:1.3.0-alpha01"
implementation "androidx.constraintlayout:constraintlayout:1.1.3"
implementation "androidx.legacy:legacy-support-v4:1.0.0"
testImplementation "junit:junit:4.13"
diff --git a/app/src/main/java/org/mian/gitnex/fragments/OrganizationInfoFragment.java b/app/src/main/java/org/mian/gitnex/fragments/OrganizationInfoFragment.java
index adeb45b4..835be91d 100644
--- a/app/src/main/java/org/mian/gitnex/fragments/OrganizationInfoFragment.java
+++ b/app/src/main/java/org/mian/gitnex/fragments/OrganizationInfoFragment.java
@@ -3,10 +3,6 @@ package org.mian.gitnex.fragments;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
-import androidx.annotation.NonNull;
-import androidx.fragment.app.Fragment;
-import retrofit2.Call;
-import retrofit2.Callback;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@@ -15,6 +11,8 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
+import androidx.annotation.NonNull;
+import androidx.fragment.app.Fragment;
import org.mian.gitnex.R;
import org.mian.gitnex.clients.PicassoService;
import org.mian.gitnex.clients.RetrofitClient;
@@ -22,6 +20,8 @@ import org.mian.gitnex.helpers.Authorization;
import org.mian.gitnex.helpers.RoundedTransformation;
import org.mian.gitnex.models.Organization;
import org.mian.gitnex.util.TinyDB;
+import retrofit2.Call;
+import retrofit2.Callback;
/**
* Author M M Arif
@@ -107,10 +107,34 @@ public class OrganizationInfoFragment extends Fragment {
orgInfoLayout.setVisibility(View.VISIBLE);
assert orgInfo != null;
- PicassoService.getInstance(ctx).get().load(orgInfo.getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(180, 180).centerCrop().into(orgAvatar);
- orgDescInfo.setText(orgInfo.getDescription());
- orgWebsiteInfo.setText(orgInfo.getWebsite());
- orgLocationInfo.setText(orgInfo.getLocation());
+
+ PicassoService.getInstance(ctx).get()
+ .load(orgInfo.getAvatar_url())
+ .placeholder(R.drawable.loader_animated)
+ .transform(new RoundedTransformation(8, 0))
+ .resize(230, 230)
+ .centerCrop().into(orgAvatar);
+
+ if(!orgInfo.getDescription().isEmpty()) {
+ orgDescInfo.setText(orgInfo.getDescription());
+ }
+ else {
+ orgDescInfo.setText(getString(R.string.noDataDescription));
+ }
+
+ if(!orgInfo.getWebsite().isEmpty()) {
+ orgWebsiteInfo.setText(orgInfo.getWebsite());
+ }
+ else {
+ orgWebsiteInfo.setText(getString(R.string.noDataWebsite));
+ }
+
+ if(!orgInfo.getLocation().isEmpty()) {
+ orgLocationInfo.setText(orgInfo.getLocation());
+ }
+ else {
+ orgLocationInfo.setText(getString(R.string.noDataLocation));
+ }
mProgressBar.setVisibility(View.GONE);
diff --git a/app/src/main/java/org/mian/gitnex/fragments/RepoInfoFragment.java b/app/src/main/java/org/mian/gitnex/fragments/RepoInfoFragment.java
index 4ee562ab..1954109b 100644
--- a/app/src/main/java/org/mian/gitnex/fragments/RepoInfoFragment.java
+++ b/app/src/main/java/org/mian/gitnex/fragments/RepoInfoFragment.java
@@ -252,7 +252,14 @@ public class RepoInfoFragment extends Fragment {
assert repoInfo != null;
repoMetaName.setText(repoInfo.getName());
- repoMetaDescription.setText(repoInfo.getDescription());
+
+ if(!repoInfo.getDescription().isEmpty()) {
+ repoMetaDescription.setText(repoInfo.getDescription());
+ }
+ else {
+ repoMetaDescription.setText(getString(R.string.noDataDescription));
+ }
+
repoMetaStars.setText(repoInfo.getStars_count());
if(repoInfo.getOpen_pull_count() != null) {
diff --git a/app/src/main/res/drawable/ic_location.xml b/app/src/main/res/drawable/ic_location.xml
new file mode 100644
index 00000000..ec251443
--- /dev/null
+++ b/app/src/main/res/drawable/ic_location.xml
@@ -0,0 +1,5 @@
+
+
+
diff --git a/app/src/main/res/layout/fragment_organization_info.xml b/app/src/main/res/layout/fragment_organization_info.xml
index 1e6103d3..ea0d5c9b 100644
--- a/app/src/main/res/layout/fragment_organization_info.xml
+++ b/app/src/main/res/layout/fragment_organization_info.xml
@@ -1,6 +1,8 @@
@@ -11,85 +13,131 @@
android:layout_height="match_parent">
+ android:orientation="vertical"
+ android:padding="15dp"
+ android:visibility="gone"
+ tools:visibility="visible">
+ android:layout_marginTop="20dp"
+ android:layout_marginBottom="30dp"
+ android:contentDescription="@string/orgContentAvatar" />
-
-
+ android:layout_marginBottom="5dp"
+ android:textSize="22sp"
+ android:textStyle="bold" />
-
-
-
-
+ android:textSize="16sp" />
-
+ android:layout_height="1dp"
+ android:layout_marginTop="25dp"
+ android:layout_marginBottom="25dp"
+ android:background="?attr/dividerColor" />
-
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="20dp"
+ android:orientation="horizontal"
+ android:paddingLeft="15dp"
+ android:paddingRight="15dp">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -100,13 +148,15 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
-
+ tools:visibility="gone" />
diff --git a/app/src/main/res/layout/fragment_repo_info.xml b/app/src/main/res/layout/fragment_repo_info.xml
index e676a22f..99efc044 100644
--- a/app/src/main/res/layout/fragment_repo_info.xml
+++ b/app/src/main/res/layout/fragment_repo_info.xml
@@ -62,9 +62,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
+ android:layout_marginBottom="5dp"
android:textSize="22sp"
- android:textStyle="bold"
- tools:text="GitNex" />
+ android:textStyle="bold" />
+ android:textColorLink="@color/lightBlue"
+ android:textSize="16sp" />
@@ -88,7 +88,7 @@
@@ -110,7 +110,7 @@
@@ -132,7 +132,7 @@
@@ -154,7 +154,7 @@
@@ -179,12 +179,11 @@
android:layout_height="1dp"
android:layout_marginTop="25dp"
android:layout_marginBottom="25dp"
- android:alpha="0.2"
- android:background="@color/lightGray" />
+ android:background="?attr/dividerColor" />
-
\ No newline at end of file
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 3b340496..f8efef0b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -486,6 +486,8 @@
No stars found
No watchers found
No website found
+ No description found
+ No location found
Star
Watcher