Added navigation ability for HTML links in notifications
git-svn-id: https://forja.rediris.es/svn/cusl6-swadroid/trunk@238 5bc14d19-1e4b-4ba2-aa50-860af135f48c
This commit is contained in:
parent
322516cb9e
commit
4d775e8aa2
|
@ -96,6 +96,7 @@
|
|||
android:textColor="@color/foreground1"
|
||||
android:textSize="16sp"
|
||||
android:padding="1dip"
|
||||
android:autoLink="web"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
|
@ -76,6 +76,7 @@ public class NotificationsCursorAdapter extends CursorAdapter {
|
|||
public void bindView(View view, Context context, Cursor cursor) {
|
||||
final Context ctx = context;
|
||||
final Long notificationCode = cursor.getLong(cursor.getColumnIndex("id"));
|
||||
final Cursor curs = cursor;
|
||||
long unixTime;
|
||||
String type, sender, senderFirstname, senderSurname1, senderSurname2, summaryText, contentText;
|
||||
String[] dateContent;
|
||||
|
@ -106,6 +107,18 @@ public class NotificationsCursorAdapter extends CursorAdapter {
|
|||
}
|
||||
};
|
||||
|
||||
OnClickListener contentListener = new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
TextView content = (TextView) v.findViewById(R.id.eventText);
|
||||
|
||||
if(content.getSelectionStart() == -1 && content.getSelectionEnd() == -1) {
|
||||
toggleContentVisibility(curs.getPosition());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
content.setOnClickListener(contentListener);
|
||||
|
||||
if(eventType != null) {
|
||||
type = cursor.getString(cursor.getColumnIndex("eventType"));
|
||||
messageReplyButton.setVisibility(View.GONE);
|
||||
|
|
Loading…
Reference in New Issue
Block a user