From 86165905a4b6c9848d71382979fad620644690fe Mon Sep 17 00:00:00 2001 From: santimunin Date: Sat, 25 Aug 2012 09:25:33 +0000 Subject: [PATCH] =?UTF-8?q?2012-08-25=20Santiago=20Mun=C3=ADn=20=20=09*=20src/pandroid=5Fevent=5Fviewer/pandorafms/Ma?= =?UTF-8?q?in.java:=20Bug=20with=20api=20version=20detect=20solved.=20=09*?= =?UTF-8?q?=20src/pandroid=5Fevent=5Fviewer/pandorafms/EventList.java:=20C?= =?UTF-8?q?omments=20are=20cut=20when=20they're=20too=20long.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6914 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- extras/pandroid_event_viewer/ChangeLog | 4 ++++ extras/pandroid_event_viewer/res/layout/options.xml | 3 ++- .../src/pandroid_event_viewer/pandorafms/EventList.java | 4 ++++ .../src/pandroid_event_viewer/pandorafms/Main.java | 4 +++- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/extras/pandroid_event_viewer/ChangeLog b/extras/pandroid_event_viewer/ChangeLog index 4aaa665e71..abc5fab648 100644 --- a/extras/pandroid_event_viewer/ChangeLog +++ b/extras/pandroid_event_viewer/ChangeLog @@ -1,3 +1,7 @@ +2012-08-25 Santiago Munín + * src/pandroid_event_viewer/pandorafms/Main.java: Bug with api version detect solved. + * src/pandroid_event_viewer/pandorafms/EventList.java: Comments are cut when they're too long. + 2012-08-24 Santiago Munín * src/pandroid_event_viewer/pandorafms/Core.java: Fixed a bug (possible null argument as image). * src/pandroid_event_viewer/pandorafms/EventList.java: Create incident is displayed as a dialog diff --git a/extras/pandroid_event_viewer/res/layout/options.xml b/extras/pandroid_event_viewer/res/layout/options.xml index afad572ba3..60eb9c0cc2 100644 --- a/extras/pandroid_event_viewer/res/layout/options.xml +++ b/extras/pandroid_event_viewer/res/layout/options.xml @@ -123,7 +123,8 @@ + android:layout_height="wrap_content" + android:layout_weight="1" /> 200) { + item.user_comment = item.user_comment.substring(0, 197); + item.user_comment = item.user_comment.concat("..."); + } text = (TextView) viewEventExtended .findViewById(R.id.comments_text); text.setText(item.user_comment); diff --git a/extras/pandroid_event_viewer/src/pandroid_event_viewer/pandorafms/Main.java b/extras/pandroid_event_viewer/src/pandroid_event_viewer/pandorafms/Main.java index 87ceac7367..f688ac6051 100644 --- a/extras/pandroid_event_viewer/src/pandroid_event_viewer/pandorafms/Main.java +++ b/extras/pandroid_event_viewer/src/pandroid_event_viewer/pandorafms/Main.java @@ -67,6 +67,7 @@ public class Main extends Activity { private static String PROFILE_PREFIX = "profile:"; private static String DEFAULT_PROFILE_NAME = "Default"; private static String DEFAULT_PROFILE = "0|3||||0|6"; + private static String VERSION_4_0_2_LABEL = "v4.0.2"; private PandroidEventviewerActivity object; private HashMap pandoraGroups; private Spinner comboSeverity; @@ -89,7 +90,8 @@ public class Main extends Activity { this.getString(R.string.const_string_preferences), Activity.MODE_PRIVATE); - if (preferences.getString("api_version", "v4.0.2").equals("v4.0.2")) { + if (preferences.getString("api_version", "") + .equals(VERSION_4_0_2_LABEL)) { version402 = true; }