Skip to content
This repository has been archived by the owner on Jun 20, 2021. It is now read-only.

Commit

Permalink
Fix Website Overflow on Long Text
Browse files Browse the repository at this point in the history
Until we can re-do the layout, this fix should handle overflow issues on
long URLs. First, strip the leading "http" from them and then limit the
length to 20 characters. This won't affect the actual click location,
just the display.

Fixes #171
  • Loading branch information
srvrguy committed Jun 6, 2014
1 parent 5c2b6fd commit 3a75752
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Atarashii/res/layout/activity_profile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@
android:layout_alignBaseline="@id/websitefront"
android:layout_alignParentRight="true"
android:text="@string/layout_card_loading"
android:textSize="16sp" />
android:textSize="16sp"
android:maxLength="20" />

<TextView
android:id="@+id/commentsfront"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public void Settext(){
TextView tv26 = (TextView) findViewById(R.id.websitefront);
LinearLayout tv36 = (LinearLayout) findViewById(R.id.details_card);
if (record.getProfile().getDetails().getWebsite() != null && record.getProfile().getDetails().getWebsite().contains("http://") && record.getProfile().getDetails().getWebsite().contains(".")){ // filter fake websites
tv25.setText(record.getProfile().getDetails().getWebsite());
tv25.setText(record.getProfile().getDetails().getWebsite().replace("http://", ""));
}else{
tv25.setVisibility(View.GONE);
tv26.setVisibility(View.GONE);
Expand Down

0 comments on commit 3a75752

Please sign in to comment.