Browse Source

Merge branch 'master' into improve-images-loading

tags/2.5.0-rc4
6543 1 month ago
parent
commit
786ac3999a
3 changed files with 12 additions and 10 deletions
  1. +4
    -4
      app/src/main/java/org/mian/gitnex/activities/IssueDetailActivity.java
  2. +3
    -3
      app/src/main/java/org/mian/gitnex/adapters/LabelsAdapter.java
  3. +5
    -3
      app/src/main/res/layout/list_labels.xml

+ 4
- 4
app/src/main/java/org/mian/gitnex/activities/IssueDetailActivity.java View File

@@ -427,7 +427,7 @@ public class IssueDetailActivity extends BaseActivity {

if(singleIssue.getLabels() != null) {
labelsScrollView.setVisibility(View.VISIBLE);
int width = 33;
int width = 25;
for (int i = 0; i < singleIssue.getLabels().size(); i++) {

String labelColor = singleIssue.getLabels().get(i).getColor();
@@ -443,11 +443,11 @@ public class IssueDetailActivity extends BaseActivity {
.beginConfig()
.useFont(Typeface.DEFAULT)
.textColor(new ColorInverter().getContrastColor(color))
.fontSize(36)
.fontSize(30)
.width((width * labelName.length()) - ((width / 4) * labelName.length()))
.height(60)
.height(50)
.endConfig()
.buildRoundRect(labelName, color, 8);
.buildRoundRect(labelName, color, 10);
labelsView.setImageDrawable(drawable);

labelsLayout.addView(labelsView);


+ 3
- 3
app/src/main/java/org/mian/gitnex/adapters/LabelsAdapter.java View File

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

}


+ 5
- 3
app/src/main/res/layout/list_labels.xml View File

@@ -26,12 +26,14 @@

<ImageView
android:id="@+id/labelsOptionsMenu"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_weight="0.15"
android:contentDescription="@string/labelMenuContentDesc"
android:gravity="end"
android:src="@drawable/ic_dotted_menu_horizontal"
android:contentDescription="@string/labelMenuContentDesc" />
android:scaleType="fitEnd"
android:src="@drawable/ic_dotted_menu_horizontal" />

<TextView
android:layout_width="wrap_content"


Loading…
Cancel
Save