Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of https://github.com/ggrassi/challp

  • Loading branch information...
commit 20fe1412e22ca35e30b6dfb028b9c507433b2294 2 parents 7f37b63 + 81b9aa7
@hansdurst hansdurst authored
View
2  traildevils/res/layout/detail_view.xml
@@ -94,7 +94,7 @@
</LinearLayout>
<LinearLayout android:id="@+id/layoutInfo" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent">
<TextView android:textStyle="bold" android:text="@string/detail_description" android:id="@+id/detailTrailDescriptionDes" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
- <TextView android:text="@string/detail_na" android:id="@+id/detailTrailDescription" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
+ <TextView android:text="@string/detail_na" android:autoLink="web" android:linksClickable="true" android:id="@+id/detailTrailDescription" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
</LinearLayout>
</LinearLayout>
</LinearLayout>
View
8 traildevils/src/ch/hsr/challp/and4/activities/TrailDetail.java
@@ -15,6 +15,7 @@
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
+import android.text.method.LinkMovementMethod;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
@@ -70,6 +71,8 @@ public void onCreate(Bundle savedInstanceState) {
TextView countryView = (TextView)findViewById(R.id.detailTrailCountry);
TextView placeView = (TextView)findViewById(R.id.detailTrailPlace);
TextView descriptionView = (TextView)findViewById(R.id.detailTrailDescription);
+ descriptionView.setMovementMethod(LinkMovementMethod.getInstance());
+
if(activeTrail.getImageUrl800()==null || activeTrail.getImageUrl800().equals("null")){
mainTrailImage.setImageResource(R.drawable.trail_dummy);
@@ -85,7 +88,10 @@ public void onCreate(Bundle savedInstanceState) {
placeView.setText(place);
countryView.setText(country);
- descriptionView.setText(activeTrail.getDescription());
+
+
+ String description = activeTrail.getDescription().replaceAll("\\<[^>]*>","");
+ descriptionView.setText(description);
favBtn = (ImageButton)findViewById(R.id.fav_button);
Button webBtn = (Button)findViewById(R.id.web_button);
Please sign in to comment.
Something went wrong with that request. Please try again.