Add placeholders for images #331

Merged
mmarif merged 2 commits from improve-images-loading into master 2020-04-01 06:09:05 +00:00
3 changed files with 12 additions and 10 deletions
Showing only changes of commit 786ac3999a - Show all commits

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);

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);
}

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"