mirror of
https://codeberg.org/gitnex/GitNex
synced 2025-02-09 16:48:50 +01:00
Improve single issue UI (#518)
Merge branch 'master' into single-issue-ui Add progressbar, match the ui to other ui for views(lines etc). And other refactors. Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/518 Reviewed-by: opyale <opyale@noreply.gitea.io>
This commit is contained in:
parent
0f9e130cf4
commit
6721b09de9
@ -20,6 +20,7 @@ import android.view.View;
|
|||||||
import android.widget.HorizontalScrollView;
|
import android.widget.HorizontalScrollView;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.ScrollView;
|
import android.widget.ScrollView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@ -103,6 +104,8 @@ public class IssueDetailActivity extends BaseActivity {
|
|||||||
private Context appCtx;
|
private Context appCtx;
|
||||||
private LinearLayout labelsLayout;
|
private LinearLayout labelsLayout;
|
||||||
private LinearLayout assigneesLayout;
|
private LinearLayout assigneesLayout;
|
||||||
|
private View divider;
|
||||||
|
private ProgressBar progressBar;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutResourceId() {
|
protected int getLayoutResourceId() {
|
||||||
@ -142,6 +145,8 @@ public class IssueDetailActivity extends BaseActivity {
|
|||||||
createNewComment = findViewById(R.id.addNewComment);
|
createNewComment = findViewById(R.id.addNewComment);
|
||||||
labelsLayout = findViewById(R.id.frameLabels);
|
labelsLayout = findViewById(R.id.frameLabels);
|
||||||
assigneesLayout = findViewById(R.id.frameAssignees);
|
assigneesLayout = findViewById(R.id.frameAssignees);
|
||||||
|
divider = findViewById(R.id.divider);
|
||||||
|
progressBar = findViewById(R.id.progressBar);
|
||||||
|
|
||||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||||
TextView toolbarTitle = toolbar.findViewById(R.id.toolbar_title);
|
TextView toolbarTitle = toolbar.findViewById(R.id.toolbar_title);
|
||||||
@ -258,67 +263,48 @@ public class IssueDetailActivity extends BaseActivity {
|
|||||||
final int issueIndex = Integer.parseInt(tinyDb.getString("issueNumber"));
|
final int issueIndex = Integer.parseInt(tinyDb.getString("issueNumber"));
|
||||||
|
|
||||||
if(tinyDb.getBoolean("commentPosted")) {
|
if(tinyDb.getBoolean("commentPosted")) {
|
||||||
scrollViewComments.post(new Runnable() {
|
scrollViewComments.post(() -> {
|
||||||
|
|
||||||
@Override
|
IssueCommentsViewModel.loadIssueComments(instanceUrl, Authorization.returnAuthentication(ctx, loginUid, instanceToken), repoOwner, repoName, issueIndex, ctx);
|
||||||
public void run() {
|
|
||||||
|
|
||||||
IssueCommentsViewModel.loadIssueComments(instanceUrl, Authorization.returnAuthentication(ctx, loginUid, instanceToken), repoOwner, repoName, issueIndex, ctx);
|
new Handler().postDelayed(() -> scrollViewComments.fullScroll(ScrollView.FOCUS_DOWN), 1000);
|
||||||
|
|
||||||
new Handler().postDelayed(new Runnable() {
|
tinyDb.putBoolean("commentPosted", false);
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
|
|
||||||
scrollViewComments.fullScroll(ScrollView.FOCUS_DOWN);
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
tinyDb.putBoolean("commentPosted", false);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tinyDb.getBoolean("commentEdited")) {
|
if(tinyDb.getBoolean("commentEdited")) {
|
||||||
scrollViewComments.post(new Runnable() {
|
scrollViewComments.post(() -> {
|
||||||
|
|
||||||
@Override
|
IssueCommentsViewModel.loadIssueComments(instanceUrl, Authorization.returnAuthentication(ctx, loginUid, instanceToken), repoOwner, repoName, issueIndex, ctx);
|
||||||
public void run() {
|
tinyDb.putBoolean("commentEdited", false);
|
||||||
|
|
||||||
IssueCommentsViewModel.loadIssueComments(instanceUrl, Authorization.returnAuthentication(ctx, loginUid, instanceToken), repoOwner, repoName, issueIndex, ctx);
|
|
||||||
tinyDb.putBoolean("commentEdited", false);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tinyDb.getBoolean("singleIssueUpdate")) {
|
if(tinyDb.getBoolean("singleIssueUpdate")) {
|
||||||
|
|
||||||
new Handler().postDelayed(new Runnable() {
|
new Handler().postDelayed(() -> {
|
||||||
|
|
||||||
@Override
|
assigneesLayout.removeAllViews();
|
||||||
public void run() {
|
labelsLayout.removeAllViews();
|
||||||
|
getSingleIssue(instanceUrl, instanceToken, repoOwner, repoName, issueIndex, loginUid);
|
||||||
|
tinyDb.putBoolean("singleIssueUpdate", false);
|
||||||
|
|
||||||
assigneesLayout.removeAllViews();
|
|
||||||
labelsLayout.removeAllViews();
|
|
||||||
getSingleIssue(instanceUrl, instanceToken, repoOwner, repoName, issueIndex, loginUid);
|
|
||||||
tinyDb.putBoolean("singleIssueUpdate", false);
|
|
||||||
}
|
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tinyDb.getBoolean("issueEdited")) {
|
if(tinyDb.getBoolean("issueEdited")) {
|
||||||
|
|
||||||
new Handler().postDelayed(new Runnable() {
|
new Handler().postDelayed(() -> {
|
||||||
|
|
||||||
@Override
|
assigneesLayout.removeAllViews();
|
||||||
public void run() {
|
labelsLayout.removeAllViews();
|
||||||
|
getSingleIssue(instanceUrl, instanceToken, repoOwner, repoName, issueIndex, loginUid);
|
||||||
|
tinyDb.putBoolean("issueEdited", false);
|
||||||
|
|
||||||
assigneesLayout.removeAllViews();
|
|
||||||
labelsLayout.removeAllViews();
|
|
||||||
getSingleIssue(instanceUrl, instanceToken, repoOwner, repoName, issueIndex, loginUid);
|
|
||||||
tinyDb.putBoolean("issueEdited", false);
|
|
||||||
}
|
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -334,8 +320,14 @@ public class IssueDetailActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onChanged(@Nullable List<IssueComments> issueCommentsMain) {
|
public void onChanged(@Nullable List<IssueComments> issueCommentsMain) {
|
||||||
|
|
||||||
|
assert issueCommentsMain != null;
|
||||||
|
if(issueCommentsMain.size() > 0) {
|
||||||
|
divider.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
adapter = new IssueCommentsAdapter(ctx, issueCommentsMain);
|
adapter = new IssueCommentsAdapter(ctx, issueCommentsMain);
|
||||||
mRecyclerView.setAdapter(adapter);
|
mRecyclerView.setAdapter(adapter);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -351,192 +343,192 @@ public class IssueDetailActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onResponse(@NonNull Call<Issues> call, @NonNull Response<Issues> response) {
|
public void onResponse(@NonNull Call<Issues> call, @NonNull Response<Issues> response) {
|
||||||
|
|
||||||
if(response.isSuccessful()) {
|
if(response.code() == 200) {
|
||||||
if(response.code() == 200) {
|
|
||||||
|
|
||||||
Issues singleIssue = response.body();
|
Issues singleIssue = response.body();
|
||||||
assert singleIssue != null;
|
assert singleIssue != null;
|
||||||
|
|
||||||
final Markwon markwon = Markwon.builder(Objects.requireNonNull(ctx)).usePlugin(CorePlugin.create()).usePlugin(ImagesPlugin.create(plugin -> {
|
final Markwon markwon = Markwon.builder(Objects.requireNonNull(ctx)).usePlugin(CorePlugin.create()).usePlugin(ImagesPlugin.create(plugin -> {
|
||||||
plugin.addSchemeHandler(new SchemeHandler() {
|
plugin.addSchemeHandler(new SchemeHandler() {
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public ImageItem handle(@NonNull String raw, @NonNull Uri uri) {
|
|
||||||
|
|
||||||
final int resourceId = ctx.getResources().getIdentifier(raw.substring("drawable://".length()), "drawable", ctx.getPackageName());
|
|
||||||
|
|
||||||
final Drawable drawable = ctx.getDrawable(resourceId);
|
|
||||||
|
|
||||||
assert drawable != null;
|
|
||||||
return ImageItem.withResult(drawable);
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public Collection<String> supportedSchemes() {
|
|
||||||
|
|
||||||
return Collections.singleton("drawable");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
plugin.placeholderProvider(drawable -> null);
|
|
||||||
plugin.addMediaDecoder(GifMediaDecoder.create(false));
|
|
||||||
plugin.addMediaDecoder(SvgMediaDecoder.create(ctx.getResources()));
|
|
||||||
plugin.addMediaDecoder(SvgMediaDecoder.create());
|
|
||||||
plugin.defaultMediaDecoder(DefaultMediaDecoder.create(ctx.getResources()));
|
|
||||||
plugin.defaultMediaDecoder(DefaultMediaDecoder.create());
|
|
||||||
|
|
||||||
})).usePlugin(new AbstractMarkwonPlugin() {
|
|
||||||
|
|
||||||
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public void configureTheme(@NonNull MarkwonTheme.Builder builder) {
|
public ImageItem handle(@NonNull String raw, @NonNull Uri uri) {
|
||||||
|
|
||||||
builder.codeTextColor(tinyDb.getInt("codeBlockColor")).codeBackgroundColor(tinyDb.getInt("codeBlockBackground")).linkColor(getResources().getColor(R.color.lightBlue));
|
final int resourceId = ctx.getResources().getIdentifier(raw.substring("drawable://".length()), "drawable", ctx.getPackageName());
|
||||||
|
|
||||||
|
final Drawable drawable = ctx.getDrawable(resourceId);
|
||||||
|
|
||||||
|
assert drawable != null;
|
||||||
|
return ImageItem.withResult(drawable);
|
||||||
}
|
}
|
||||||
}).usePlugin(TablePlugin.create(ctx)).usePlugin(TaskListPlugin.create(ctx)).usePlugin(HtmlPlugin.create()).usePlugin(StrikethroughPlugin.create()).usePlugin(LinkifyPlugin.create()).build();
|
|
||||||
|
|
||||||
TinyDB tinyDb = new TinyDB(appCtx);
|
@NonNull
|
||||||
final String locale = tinyDb.getString("locale");
|
@Override
|
||||||
final String timeFormat = tinyDb.getString("dateFormat");
|
public Collection<String> supportedSchemes() {
|
||||||
tinyDb.putString("issueState", singleIssue.getState());
|
|
||||||
tinyDb.putString("issueTitle", singleIssue.getTitle());
|
|
||||||
|
|
||||||
PicassoService.getInstance(ctx).get().load(singleIssue.getUser().getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(assigneeAvatar);
|
|
||||||
String issueNumber_ = "<font color='" + appCtx.getResources().getColor(R.color.lightGray) + "'>" + appCtx.getResources().getString(R.string.hash) + singleIssue.getNumber() + "</font>";
|
|
||||||
issueTitle.setText(Html.fromHtml(issueNumber_ + " " + singleIssue.getTitle()));
|
|
||||||
String cleanIssueDescription = singleIssue.getBody().trim();
|
|
||||||
Spanned bodyWithMD = markwon.toMarkdown(EmojiParser.parseToUnicode(cleanIssueDescription));
|
|
||||||
markwon.setParsedMarkdown(issueDescription, UserMentions.UserMentionsFunc(ctx, bodyWithMD, cleanIssueDescription));
|
|
||||||
|
|
||||||
RelativeLayout.LayoutParams paramsDesc = (RelativeLayout.LayoutParams) issueDescription.getLayoutParams();
|
|
||||||
|
|
||||||
LinearLayout.LayoutParams params1 = new LinearLayout.LayoutParams(80, 80);
|
|
||||||
params1.setMargins(15, 0, 0, 0);
|
|
||||||
|
|
||||||
if(singleIssue.getAssignees() != null) {
|
|
||||||
assigneesScrollView.setVisibility(View.VISIBLE);
|
|
||||||
for(int i = 0; i < singleIssue.getAssignees().size(); i++) {
|
|
||||||
|
|
||||||
ImageView assigneesView = new ImageView(ctx);
|
|
||||||
|
|
||||||
PicassoService.getInstance(ctx).get().load(singleIssue.getAssignees().get(i).getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(100, 100).centerCrop().into(assigneesView);
|
|
||||||
|
|
||||||
assigneesLayout.addView(assigneesView);
|
|
||||||
assigneesView.setLayoutParams(params1);
|
|
||||||
if(!singleIssue.getAssignees().get(i).getFull_name().equals("")) {
|
|
||||||
assigneesView.setOnClickListener(new ClickListener(getString(R.string.assignedTo, singleIssue.getAssignees().get(i).getFull_name()), ctx));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
assigneesView.setOnClickListener(new ClickListener(getString(R.string.assignedTo, singleIssue.getAssignees().get(i).getLogin()), ctx));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
return Collections.singleton("drawable");
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
plugin.placeholderProvider(drawable -> null);
|
||||||
|
plugin.addMediaDecoder(GifMediaDecoder.create(false));
|
||||||
|
plugin.addMediaDecoder(SvgMediaDecoder.create(ctx.getResources()));
|
||||||
|
plugin.addMediaDecoder(SvgMediaDecoder.create());
|
||||||
|
plugin.defaultMediaDecoder(DefaultMediaDecoder.create(ctx.getResources()));
|
||||||
|
plugin.defaultMediaDecoder(DefaultMediaDecoder.create());
|
||||||
|
|
||||||
|
})).usePlugin(new AbstractMarkwonPlugin() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void configureTheme(@NonNull MarkwonTheme.Builder builder) {
|
||||||
|
|
||||||
|
builder.codeTextColor(tinyDb.getInt("codeBlockColor")).codeBackgroundColor(tinyDb.getInt("codeBlockBackground")).linkColor(getResources().getColor(R.color.lightBlue));
|
||||||
}
|
}
|
||||||
else {
|
}).usePlugin(TablePlugin.create(ctx)).usePlugin(TaskListPlugin.create(ctx)).usePlugin(HtmlPlugin.create()).usePlugin(StrikethroughPlugin.create()).usePlugin(LinkifyPlugin.create()).build();
|
||||||
assigneesScrollView.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
|
TinyDB tinyDb = new TinyDB(appCtx);
|
||||||
params.setMargins(0, 0, 15, 0);
|
final String locale = tinyDb.getString("locale");
|
||||||
|
final String timeFormat = tinyDb.getString("dateFormat");
|
||||||
|
tinyDb.putString("issueState", singleIssue.getState());
|
||||||
|
tinyDb.putString("issueTitle", singleIssue.getTitle());
|
||||||
|
|
||||||
if(singleIssue.getLabels() != null) {
|
PicassoService.getInstance(ctx).get().load(singleIssue.getUser().getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(assigneeAvatar);
|
||||||
labelsScrollView.setVisibility(View.VISIBLE);
|
String issueNumber_ = "<font color='" + appCtx.getResources().getColor(R.color.lightGray) + "'>" + appCtx.getResources().getString(R.string.hash) + singleIssue.getNumber() + "</font>";
|
||||||
int width = 25;
|
issueTitle.setText(Html.fromHtml(issueNumber_ + " " + singleIssue.getTitle()));
|
||||||
for(int i = 0; i < singleIssue.getLabels().size(); i++) {
|
String cleanIssueDescription = singleIssue.getBody().trim();
|
||||||
|
Spanned bodyWithMD = markwon.toMarkdown(EmojiParser.parseToUnicode(cleanIssueDescription));
|
||||||
|
markwon.setParsedMarkdown(issueDescription, UserMentions.UserMentionsFunc(ctx, bodyWithMD, cleanIssueDescription));
|
||||||
|
|
||||||
String labelColor = singleIssue.getLabels().get(i).getColor();
|
RelativeLayout.LayoutParams paramsDesc = (RelativeLayout.LayoutParams) issueDescription.getLayoutParams();
|
||||||
String labelName = singleIssue.getLabels().get(i).getName();
|
|
||||||
int color = Color.parseColor("#" + labelColor);
|
|
||||||
|
|
||||||
ImageView labelsView = new ImageView(ctx);
|
LinearLayout.LayoutParams params1 = new LinearLayout.LayoutParams(80, 80);
|
||||||
labelsLayout.setOrientation(LinearLayout.HORIZONTAL);
|
params1.setMargins(15, 0, 0, 0);
|
||||||
labelsLayout.setGravity(Gravity.START | Gravity.TOP);
|
|
||||||
labelsView.setLayoutParams(params);
|
|
||||||
|
|
||||||
TextDrawable drawable = TextDrawable.builder().beginConfig().useFont(Typeface.DEFAULT).textColor(new ColorInverter().getContrastColor(color)).fontSize(30).width(LabelWidthCalculator.calculateLabelWidth(labelName, Typeface.DEFAULT, 30, 15)).height(50).endConfig().buildRoundRect(labelName, color, 10);
|
if(singleIssue.getAssignees() != null) {
|
||||||
labelsView.setImageDrawable(drawable);
|
assigneesScrollView.setVisibility(View.VISIBLE);
|
||||||
|
for(int i = 0; i < singleIssue.getAssignees().size(); i++) {
|
||||||
|
|
||||||
labelsLayout.addView(labelsView);
|
ImageView assigneesView = new ImageView(ctx);
|
||||||
|
|
||||||
|
PicassoService.getInstance(ctx).get().load(singleIssue.getAssignees().get(i).getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(100, 100).centerCrop().into(assigneesView);
|
||||||
|
|
||||||
|
assigneesLayout.addView(assigneesView);
|
||||||
|
assigneesView.setLayoutParams(params1);
|
||||||
|
if(!singleIssue.getAssignees().get(i).getFull_name().equals("")) {
|
||||||
|
assigneesView.setOnClickListener(new ClickListener(getString(R.string.assignedTo, singleIssue.getAssignees().get(i).getFull_name()), ctx));
|
||||||
}
|
}
|
||||||
}
|
else {
|
||||||
else {
|
assigneesView.setOnClickListener(new ClickListener(getString(R.string.assignedTo, singleIssue.getAssignees().get(i).getLogin()), ctx));
|
||||||
labelsScrollView.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(singleIssue.getDue_date() != null) {
|
|
||||||
|
|
||||||
if(timeFormat.equals("normal") || timeFormat.equals("pretty")) {
|
|
||||||
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd", new Locale(locale));
|
|
||||||
String dueDate = formatter.format(singleIssue.getDue_date());
|
|
||||||
issueDueDate.setText(getString(R.string.dueDate, dueDate));
|
|
||||||
issueDueDate.setOnClickListener(new ClickListener(TimeHelper.customDateFormatForToastDateFormat(singleIssue.getDue_date()), ctx));
|
|
||||||
}
|
|
||||||
else if(timeFormat.equals("normal1")) {
|
|
||||||
DateFormat formatter = new SimpleDateFormat("dd-MM-yyyy", new Locale(locale));
|
|
||||||
String dueDate = formatter.format(singleIssue.getDue_date());
|
|
||||||
issueDueDate.setText(getString(R.string.dueDate, dueDate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
|
else {
|
||||||
|
assigneesScrollView.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
issueDueDate.setVisibility(View.GONE);
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||||
}
|
params.setMargins(0, 0, 15, 0);
|
||||||
|
|
||||||
String edited;
|
if(singleIssue.getLabels() != null) {
|
||||||
|
labelsScrollView.setVisibility(View.VISIBLE);
|
||||||
|
int width = 25;
|
||||||
|
for(int i = 0; i < singleIssue.getLabels().size(); i++) {
|
||||||
|
|
||||||
if(!singleIssue.getUpdated_at().equals(singleIssue.getCreated_at())) {
|
String labelColor = singleIssue.getLabels().get(i).getColor();
|
||||||
edited = getString(R.string.colorfulBulletSpan) + getString(R.string.modifiedText);
|
String labelName = singleIssue.getLabels().get(i).getName();
|
||||||
issueModified.setVisibility(View.VISIBLE);
|
int color = Color.parseColor("#" + labelColor);
|
||||||
issueModified.setText(edited);
|
|
||||||
issueModified.setOnClickListener(new ClickListener(TimeHelper.customDateFormatForToastDateFormat(singleIssue.getUpdated_at()), ctx));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
issueModified.setVisibility(View.INVISIBLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if((singleIssue.getDue_date() == null && singleIssue.getMilestone() == null) && singleIssue.getAssignees() != null) {
|
ImageView labelsView = new ImageView(ctx);
|
||||||
paramsDesc.setMargins(0, 35, 0, 0);
|
labelsLayout.setOrientation(LinearLayout.HORIZONTAL);
|
||||||
issueDescription.setLayoutParams(paramsDesc);
|
labelsLayout.setGravity(Gravity.START | Gravity.TOP);
|
||||||
}
|
labelsView.setLayoutParams(params);
|
||||||
else if(singleIssue.getDue_date() == null && singleIssue.getMilestone() == null) {
|
|
||||||
paramsDesc.setMargins(0, 55, 0, 0);
|
|
||||||
issueDescription.setLayoutParams(paramsDesc);
|
|
||||||
}
|
|
||||||
else if(singleIssue.getAssignees() == null) {
|
|
||||||
paramsDesc.setMargins(0, 35, 0, 0);
|
|
||||||
issueDescription.setLayoutParams(paramsDesc);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
paramsDesc.setMargins(0, 15, 0, 0);
|
|
||||||
issueDescription.setLayoutParams(paramsDesc);
|
|
||||||
}
|
|
||||||
|
|
||||||
issueCreatedTime.setText(TimeHelper.formatTime(singleIssue.getCreated_at(), new Locale(locale), timeFormat, ctx));
|
TextDrawable drawable = TextDrawable.builder().beginConfig().useFont(Typeface.DEFAULT).textColor(new ColorInverter().getContrastColor(color)).fontSize(30).width(LabelWidthCalculator.calculateLabelWidth(labelName, Typeface.DEFAULT, 30, 15)).height(50).endConfig().buildRoundRect(labelName, color, 10);
|
||||||
issueCreatedTime.setVisibility(View.VISIBLE);
|
labelsView.setImageDrawable(drawable);
|
||||||
|
|
||||||
if(timeFormat.equals("pretty")) {
|
labelsLayout.addView(labelsView);
|
||||||
issueCreatedTime.setOnClickListener(new ClickListener(TimeHelper.customDateFormatForToastDateFormat(singleIssue.getCreated_at()), ctx));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(singleIssue.getMilestone() != null) {
|
|
||||||
issueMilestone.setText(getString(R.string.issueMilestone, singleIssue.getMilestone().getTitle()));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
issueMilestone.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
labelsScrollView.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
if(!singleIssue.getUser().getFull_name().equals("")) {
|
if(singleIssue.getDue_date() != null) {
|
||||||
assigneeAvatar.setOnClickListener(new ClickListener(ctx.getResources().getString(R.string.issueCreator) + singleIssue.getUser().getFull_name(), ctx));
|
|
||||||
|
if(timeFormat.equals("normal") || timeFormat.equals("pretty")) {
|
||||||
|
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd", new Locale(locale));
|
||||||
|
String dueDate = formatter.format(singleIssue.getDue_date());
|
||||||
|
issueDueDate.setText(dueDate);
|
||||||
|
issueDueDate.setOnClickListener(new ClickListener(TimeHelper.customDateFormatForToastDateFormat(singleIssue.getDue_date()), ctx));
|
||||||
}
|
}
|
||||||
else {
|
else if(timeFormat.equals("normal1")) {
|
||||||
assigneeAvatar.setOnClickListener(new ClickListener(ctx.getResources().getString(R.string.issueCreator) + singleIssue.getUser().getLogin(), ctx));
|
DateFormat formatter = new SimpleDateFormat("dd-MM-yyyy", new Locale(locale));
|
||||||
|
String dueDate = formatter.format(singleIssue.getDue_date());
|
||||||
|
issueDueDate.setText(dueDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
issueDueDate.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
String edited;
|
||||||
|
|
||||||
|
if(!singleIssue.getUpdated_at().equals(singleIssue.getCreated_at())) {
|
||||||
|
edited = getString(R.string.colorfulBulletSpan) + getString(R.string.modifiedText);
|
||||||
|
issueModified.setVisibility(View.VISIBLE);
|
||||||
|
issueModified.setText(edited);
|
||||||
|
issueModified.setOnClickListener(new ClickListener(TimeHelper.customDateFormatForToastDateFormat(singleIssue.getUpdated_at()), ctx));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
issueModified.setVisibility(View.INVISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if((singleIssue.getDue_date() == null && singleIssue.getMilestone() == null) && singleIssue.getAssignees() != null) {
|
||||||
|
paramsDesc.setMargins(0, 35, 0, 0);
|
||||||
|
issueDescription.setLayoutParams(paramsDesc);
|
||||||
|
}
|
||||||
|
else if(singleIssue.getDue_date() == null && singleIssue.getMilestone() == null) {
|
||||||
|
paramsDesc.setMargins(0, 55, 0, 0);
|
||||||
|
issueDescription.setLayoutParams(paramsDesc);
|
||||||
|
}
|
||||||
|
else if(singleIssue.getAssignees() == null) {
|
||||||
|
paramsDesc.setMargins(0, 35, 0, 0);
|
||||||
|
issueDescription.setLayoutParams(paramsDesc);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
paramsDesc.setMargins(0, 15, 0, 0);
|
||||||
|
issueDescription.setLayoutParams(paramsDesc);
|
||||||
|
}
|
||||||
|
|
||||||
|
issueCreatedTime.setText(TimeHelper.formatTime(singleIssue.getCreated_at(), new Locale(locale), timeFormat, ctx));
|
||||||
|
issueCreatedTime.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
if(timeFormat.equals("pretty")) {
|
||||||
|
issueCreatedTime.setOnClickListener(new ClickListener(TimeHelper.customDateFormatForToastDateFormat(singleIssue.getCreated_at()), ctx));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(singleIssue.getMilestone() != null) {
|
||||||
|
issueMilestone.setText(getString(R.string.issueMilestone, singleIssue.getMilestone().getTitle()));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
issueMilestone.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!singleIssue.getUser().getFull_name().equals("")) {
|
||||||
|
assigneeAvatar.setOnClickListener(new ClickListener(ctx.getResources().getString(R.string.issueCreator) + singleIssue.getUser().getFull_name(), ctx));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
assigneeAvatar.setOnClickListener(new ClickListener(ctx.getResources().getString(R.string.issueCreator) + singleIssue.getUser().getLogin(), ctx));
|
||||||
|
}
|
||||||
|
|
||||||
|
progressBar.setVisibility(View.GONE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(response.code() == 401) {
|
else if(response.code() == 401) {
|
||||||
|
|
||||||
AlertDialogs.authorizationTokenRevokedDialog(ctx, getResources().getString(R.string.alertDialogTokenRevokedTitle), getResources().getString(R.string.alertDialogTokenRevokedMessage), getResources().getString(R.string.alertDialogTokenRevokedCopyNegativeButton), getResources().getString(R.string.alertDialogTokenRevokedCopyPositiveButton));
|
AlertDialogs.authorizationTokenRevokedDialog(ctx, getResources().getString(R.string.alertDialogTokenRevokedTitle), getResources().getString(R.string.alertDialogTokenRevokedMessage), getResources().getString(R.string.alertDialogTokenRevokedCopyNegativeButton), getResources().getString(R.string.alertDialogTokenRevokedCopyPositiveButton));
|
||||||
@ -550,6 +542,7 @@ public class IssueDetailActivity extends BaseActivity {
|
|||||||
|
|
||||||
Log.e("onFailure", t.toString());
|
Log.e("onFailure", t.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if(new Version(tinyDb.getString("giteaVersion")).higherOrEqual("1.12.0")) {
|
if(new Version(tinyDb.getString("giteaVersion")).higherOrEqual("1.12.0")) {
|
||||||
@ -563,6 +556,7 @@ public class IssueDetailActivity extends BaseActivity {
|
|||||||
|
|
||||||
if(response.isSuccessful()) {
|
if(response.isSuccessful()) {
|
||||||
|
|
||||||
|
assert response.body() != null;
|
||||||
tinyDb.putBoolean("issueSubscribed", response.body().getSubscribed());
|
tinyDb.putBoolean("issueSubscribed", response.body().getSubscribed());
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -580,15 +574,11 @@ public class IssueDetailActivity extends BaseActivity {
|
|||||||
tinyDb.putBoolean("issueSubscribed", false);
|
tinyDb.putBoolean("issueSubscribed", false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initCloseListener() {
|
|
||||||
|
|
||||||
View.OnClickListener onClickListener = view -> finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout android:layout_width="match_parent"
|
<LinearLayout
|
||||||
android:layout_height="match_parent"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:orientation="vertical"
|
|
||||||
android:fitsSystemWindows="true"
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
android:background="?attr/primaryBackgroundColor">
|
android:background="?attr/primaryBackgroundColor">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
@ -46,7 +46,7 @@
|
|||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/scrollViewComments"
|
android:id="@+id/scrollViewComments"
|
||||||
android:fillViewport="true">
|
android:fillViewport="true">
|
||||||
@ -54,157 +54,170 @@
|
|||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/relativeLayoutFrame"
|
android:id="@+id/relativeLayoutFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:padding="15dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/assigneeAvatar"
|
|
||||||
android:layout_width="48dp"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:layout_marginEnd="15dp"
|
|
||||||
android:contentDescription="@string/generalImgContentText" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/issueTitle"
|
|
||||||
android:layout_toEndOf="@+id/assigneeAvatar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="start"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textIsSelectable="true"
|
|
||||||
android:textSize="18sp" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/msdueFrame"
|
android:id="@+id/mainIssueLayout"
|
||||||
android:layout_toEndOf="@+id/assigneeAvatar"
|
|
||||||
android:layout_below="@+id/issueTitle"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp" >
|
android:orientation="vertical"
|
||||||
|
android:padding="15dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/assigneeAvatar"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_marginEnd="15dp"
|
||||||
|
android:contentDescription="@string/generalImgContentText" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/issueDueDate"
|
android:id="@+id/issueTitle"
|
||||||
|
android:layout_toEndOf="@+id/assigneeAvatar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_gravity="start"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="14sp" />
|
android:textIsSelectable="true"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/msdueFrame"
|
||||||
|
android:layout_toEndOf="@+id/assigneeAvatar"
|
||||||
|
android:layout_below="@+id/issueTitle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp" >
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/issueDueDate"
|
||||||
|
android:gravity="start"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_gravity="start"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_toEndOf="@+id/issueDueDate"
|
||||||
|
android:id="@+id/issueMilestone"
|
||||||
|
android:gravity="end"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<HorizontalScrollView
|
||||||
|
android:layout_below="@+id/msdueFrame"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/assigneesScrollView"
|
||||||
|
android:layout_alignParentEnd="false"
|
||||||
|
android:foregroundGravity="right"
|
||||||
|
android:scrollbarThumbHorizontal="@android:color/transparent"
|
||||||
|
android:fillViewport="true">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/frameAssignees"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:gravity="end"
|
||||||
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</HorizontalScrollView>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_toEndOf="@+id/issueDueDate"
|
android:id="@+id/issueDescription"
|
||||||
android:id="@+id/issueMilestone"
|
android:layout_below="@+id/assigneesScrollView"
|
||||||
android:gravity="end"
|
android:layout_width="match_parent"
|
||||||
android:layout_gravity="end"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="start"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="14sp" />
|
android:autoLink="web"
|
||||||
|
android:textColorLink="@color/lightBlue"
|
||||||
|
android:textIsSelectable="true"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</RelativeLayout>
|
<HorizontalScrollView
|
||||||
|
android:layout_below="@+id/issueDescription"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/labelsScrollView"
|
||||||
|
android:layout_alignParentEnd="false"
|
||||||
|
android:foregroundGravity="right"
|
||||||
|
android:scrollbarThumbHorizontal="@android:color/transparent"
|
||||||
|
android:fillViewport="true">
|
||||||
|
|
||||||
<HorizontalScrollView
|
<LinearLayout
|
||||||
android:layout_below="@+id/msdueFrame"
|
android:id="@+id/frameLabels"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/assigneesScrollView"
|
android:orientation="horizontal"
|
||||||
android:layout_alignParentEnd="false"
|
android:layout_marginTop="10dp">
|
||||||
android:foregroundGravity="right"
|
|
||||||
android:scrollbarThumbHorizontal="@android:color/transparent"
|
|
||||||
android:fillViewport="true">
|
|
||||||
|
|
||||||
<LinearLayout
|
</LinearLayout>
|
||||||
android:id="@+id/frameAssignees"
|
</HorizontalScrollView>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
<RelativeLayout
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_gravity="end"
|
|
||||||
android:gravity="end"
|
|
||||||
android:layout_marginTop="10dp">
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</HorizontalScrollView>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/issueDescription"
|
|
||||||
android:layout_below="@+id/assigneesScrollView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="start"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:autoLink="web"
|
|
||||||
android:textColorLink="@color/lightBlue"
|
|
||||||
android:textIsSelectable="true"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<HorizontalScrollView
|
|
||||||
android:layout_below="@+id/issueDescription"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/labelsScrollView"
|
|
||||||
android:layout_alignParentEnd="false"
|
|
||||||
android:foregroundGravity="right"
|
|
||||||
android:scrollbarThumbHorizontal="@android:color/transparent"
|
|
||||||
android:fillViewport="true">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/frameLabels"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/issueTimeFrame"
|
||||||
|
android:layout_below="@+id/labelsScrollView"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_marginTop="10dp">
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
</LinearLayout>
|
<TextView
|
||||||
</HorizontalScrollView>
|
android:id="@+id/issueCreatedTime"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="start"
|
||||||
|
android:text="@string/createdText"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
<RelativeLayout
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/issueModified"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:id="@+id/issueTimeFrame"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/labelsScrollView"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:orientation="horizontal"
|
android:layout_toEndOf="@+id/issueCreatedTime"
|
||||||
android:layout_marginTop="10dp">
|
android:textSize="12sp"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:text="@string/modifiedText" />
|
||||||
|
|
||||||
<TextView
|
</RelativeLayout>
|
||||||
android:id="@+id/issueCreatedTime"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="start"
|
|
||||||
android:text="@string/createdText"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textSize="12sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/issueModified"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:layout_toEndOf="@+id/issueCreatedTime"
|
|
||||||
android:textSize="12sp"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:text="@string/modifiedText" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_below="@id/issueTimeFrame"
|
android:layout_below="@id/mainIssueLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:id="@+id/divider"
|
android:id="@+id/divider"
|
||||||
android:layout_marginTop="15dp"
|
android:visibility="gone"
|
||||||
android:background="?attr/inputBackgroundColor" />
|
android:background="?attr/dividerColor" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<LinearLayout
|
||||||
android:layout_below="@+id/divider"
|
|
||||||
android:id="@+id/recyclerView"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/primaryBackgroundColor"
|
android:layout_below="@+id/divider">
|
||||||
android:padding="4dp"
|
|
||||||
android:scrollbars="vertical" />
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recyclerView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="?attr/primaryBackgroundColor"
|
||||||
|
android:scrollbars="vertical" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@ -225,6 +238,14 @@
|
|||||||
android:padding="@dimen/fab_padding"
|
android:padding="@dimen/fab_padding"
|
||||||
android:contentDescription="@string/addNewContent" />
|
android:contentDescription="@string/addNewContent" />
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/progressBar"
|
||||||
|
style="@style/Base.Widget.AppCompat.ProgressBar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="visible"
|
||||||
|
android:layout_centerInParent="true" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -1,13 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingTop="10dp"
|
android:padding="15dp"
|
||||||
android:paddingBottom="10dp"
|
|
||||||
android:id="@+id/relativeLayoutMainFrame"
|
android:id="@+id/relativeLayoutMainFrame"
|
||||||
tools:context=".activities.RepoDetailActivity"
|
|
||||||
android:background="?attr/primaryBackgroundColor">
|
android:background="?attr/primaryBackgroundColor">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
Loading…
x
Reference in New Issue
Block a user