Improving design of organisation detail page. (#534)
Design changes and updating dependencies. Small fix. Adding missing library. Cleanup. Improving design of organisation detail page. Co-authored-by: opyale <opyale@noreply.gitea.io> Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user