Skip to content

Commit

Permalink
Fix #188: Crash on tooltip due to internal R hack (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
TWiStErRob authored May 6, 2024
1 parent 3510538 commit 7972681
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import android.text.style.DynamicDrawableSpan;
import android.text.style.ForegroundColorSpan;
import android.text.style.ImageSpan;
import android.widget.TextView;

import static android.text.Spanned.SPAN_EXCLUSIVE_EXCLUSIVE;

Expand All @@ -23,7 +24,6 @@

import net.twisterrob.android.content.HtmlParser;
import net.twisterrob.android.graphics.DrawableBinder;
import net.twisterrob.android.view.TextAppearanceAccessor;
import net.twisterrob.blt.android.data.AndroidStaticData;
import net.twisterrob.blt.model.Line;
import net.twisterrob.blt.model.LineColors;
Expand All @@ -48,7 +48,7 @@ public TubeHtmlHandler(Context context, AndroidStaticData staticData) {
this.context = context;
this.colors = new LineColors(new TextLineColorScheme(staticData.getLineColors()));
this.logos = staticData.getStopTypeLogos();
this.textSize = TextAppearanceAccessor.getDefaultTextSize(context);
this.textSize = new TextView(context).getTextSize();
}

@Override public boolean handleTag(boolean opening, String tag, Editable output, Attributes attributes) {
Expand Down
3 changes: 3 additions & 0 deletions android/feature/range/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,15 @@
]]></string>
<string name="range__config__border_size">Border size</string>
<string name="range__config__border_size__tooltip" process="HtmlParser" tools:ignore="DuplicateStrings"><![CDATA[
<b>How thick should the border around the generated map overlay be?</b>
]]></string>
<string name="range__config__border_color">Border color</string>
<string name="range__config__border_color__tooltip" process="HtmlParser" tools:ignore="DuplicateStrings"><![CDATA[
<b>What color to use when drawing the border around the generated map overlay?</b>
]]></string>
<string name="range__config__pixel_density">Pixel density</string>
<string name="range__config__pixel_density__tooltip" process="HtmlParser" tools:ignore="DuplicateStrings"><![CDATA[
<b>The resolution of the generated map overlay.</b>
]]></string>

<string name="range__config__ui_show_stations">@string/pref__show_nearest__title</string>
Expand Down

0 comments on commit 7972681

Please sign in to comment.