-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add linkifyHTML() methods for Html.fromHTML() links
- Loading branch information
Showing
6 changed files
with
167 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,16 +5,65 @@ | |
android:layout_height="match_parent" | ||
android:orientation="vertical" | ||
android:padding="16dp" | ||
tools:context=".MainActivity"> | ||
tools:context=".MainActivity" | ||
tools:ignore="HardcodedText"> | ||
|
||
<TextView | ||
android:id="@+id/text1" | ||
<FrameLayout style="@style/BetterLinkMovementMethodContainer"> | ||
|
||
<TextView | ||
android:id="@android:id/text1" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:lineSpacingExtra="8dp" | ||
android:text="@string/bettermovementmethod_dummy_text_long" /> | ||
</FrameLayout> | ||
|
||
<LinearLayout | ||
style="@style/BetterLinkMovementMethodContainer" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_vertical" | ||
android:layout_marginBottom="8dp" | ||
android:background="#413f3f" | ||
android:gravity="center" | ||
android:padding="48dp" | ||
android:text="@string/bettermovementmethod_dummy_text" /> | ||
android:layout_marginTop="16dp" | ||
android:baselineAligned="false" | ||
android:orientation="horizontal"> | ||
|
||
<LinearLayout | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
android:paddingTop="4dp"> | ||
|
||
<TextView | ||
style="@style/BetterLinkMovementMethodSubtitle" | ||
android:text="Phone" /> | ||
|
||
<TextView | ||
style="@style/BetterLinkMovementMethodSubtitle" | ||
android:layout_marginTop="12dp" | ||
android:text="Email" /> | ||
|
||
<TextView | ||
style="@style/BetterLinkMovementMethodSubtitle" | ||
android:layout_marginTop="12dp" | ||
android:text="Location" /> | ||
</LinearLayout> | ||
|
||
<LinearLayout | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" | ||
android:orientation="vertical"> | ||
|
||
<TextView | ||
style="@style/BetterLinkMovementMethodText" | ||
android:text="@string/bettermovementmethod_dummy_number" /> | ||
|
||
<TextView | ||
style="@style/BetterLinkMovementMethodText" | ||
android:text="[email protected]" /> | ||
|
||
<TextView | ||
style="@style/BetterLinkMovementMethodText" | ||
android:text="https://goo.gl/maps/KfRBC6KLHA12" /> | ||
</LinearLayout> | ||
</LinearLayout> | ||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
<resources> | ||
<string name="bettermovementmethod_app_name">BetterLinkMovement</string> | ||
<string name="bettermovementmethod_dummy_text">When a forest grows too wild, a purging fire is inevitable and natural. 7899859911</string> | ||
<string name="bettermovementmethod_dummy_text_long"><![CDATA[ | ||
<a href="https://en.wikipedia.org/wiki/Gotham_City">Gotham</a> has been good to our family, but the city\u2019s been suffering. People less fortunate | ||
than us have been enduring very hard times. So we built a new, cheap, public transportation system to unite the city. And at the center, | ||
<a href="http://batman.wikia.com/wiki/Wayne_Tower_(Nolan_Films)">Wayne tower</a>. | ||
]]></string> | ||
<string name="bettermovementmethod_dummy_number">7899859911</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters