Skip to content

Commit

Permalink
NTV-278: UI pre-load polish (#1447)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkariang authored Nov 4, 2021
1 parent bd569e9 commit 57430ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.kickstarter.ui.fragments.projectpage

import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.text.Html
import android.text.Html.FROM_HTML_MODE_LEGACY
import android.text.SpannableString
import android.text.TextUtils
import android.util.Pair
Expand Down Expand Up @@ -432,7 +434,11 @@ class ProjectOverviewFragment : BaseFragment<ProjectOverviewViewModel.ViewModel>
}

private fun setBlurbTextViews(blurb: String) {
val blurbHtml = Html.fromHtml(TextUtils.htmlEncode(blurb))
val blurbHtml = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
Html.fromHtml(TextUtils.htmlEncode(blurb), FROM_HTML_MODE_LEGACY)
} else {
Html.fromHtml(TextUtils.htmlEncode(blurb))
}
binding.blurb.text = blurbHtml
}

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/project_creator_dashboard_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:padding="@dimen/project_padding_x">
android:padding="@dimen/project_padding_x"
android:visibility="gone">

<TextView
android:id="@+id/project_launch_date"
Expand Down

0 comments on commit 57430ae

Please sign in to comment.