Adjusting proportions of issue labels. (#325)

Merge remote-tracking branch 'remotes/main/master' into fab-issue

Adjusting sizes in LabelsAdapter

Adjusting proportions of issue labels.

Co-authored-by: anonTree1417 <example@example.com>
Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/325
Reviewed-by: M M Arif <mmarif@swatian.com>
This commit is contained in:
anonTree1417 2020-03-31 18:53:36 +00:00 committed by M M Arif
parent dd2339ec34
commit b46ad33dd3
2 changed files with 7 additions and 7 deletions

View File

@ -427,7 +427,7 @@ public class IssueDetailActivity extends BaseActivity {
if(singleIssue.getLabels() != null) { if(singleIssue.getLabels() != null) {
labelsScrollView.setVisibility(View.VISIBLE); labelsScrollView.setVisibility(View.VISIBLE);
int width = 33; int width = 25;
for (int i = 0; i < singleIssue.getLabels().size(); i++) { for (int i = 0; i < singleIssue.getLabels().size(); i++) {
String labelColor = singleIssue.getLabels().get(i).getColor(); String labelColor = singleIssue.getLabels().get(i).getColor();
@ -443,11 +443,11 @@ public class IssueDetailActivity extends BaseActivity {
.beginConfig() .beginConfig()
.useFont(Typeface.DEFAULT) .useFont(Typeface.DEFAULT)
.textColor(new ColorInverter().getContrastColor(color)) .textColor(new ColorInverter().getContrastColor(color))
.fontSize(36) .fontSize(30)
.width((width * labelName.length()) - ((width / 4) * labelName.length())) .width((width * labelName.length()) - ((width / 4) * labelName.length()))
.height(60) .height(50)
.endConfig() .endConfig()
.buildRoundRect(labelName, color, 8); .buildRoundRect(labelName, color, 10);
labelsView.setImageDrawable(drawable); labelsView.setImageDrawable(drawable);
labelsLayout.addView(labelsView); labelsLayout.addView(labelsView);

View File

@ -145,11 +145,11 @@ public class LabelsAdapter extends RecyclerView.Adapter<LabelsAdapter.LabelsView
//.useFont(Typeface.DEFAULT) //.useFont(Typeface.DEFAULT)
.bold() .bold()
.textColor(new ColorInverter().getContrastColor(color)) .textColor(new ColorInverter().getContrastColor(color))
.fontSize(36) .fontSize(40)
.width(LabelWidthCalculator.customWidth(getMaxLabelLength())) .width(LabelWidthCalculator.customWidth(getMaxLabelLength()))
.height(60) .height(65)
.endConfig() .endConfig()
.buildRoundRect(labelName, color, 8); .buildRoundRect(labelName, color, 10);
holder.labelsView.setImageDrawable(drawable); holder.labelsView.setImageDrawable(drawable);
} }