2013-11-05 Miguel de Dios <miguel.dedios@artica.es>
* src/pandroid_event_viewer/pandorafms/EventList.java, src/pandroid_event_viewer/pandorafms/Main.java, src/pandroid_event_viewer/pandorafms/Options.java, src/pandroid_event_viewer/pandorafms/PandroidEventviewerActivity.java, res/drawable-ldpi/save.png, res/drawable-ldpi/icon_filter.png, res/drawable-ldpi/icon_refresh.png, res/layout/main.xml, res/layout/options.xml, res/drawable/btn_dropdown_pressed.9.png, res/drawable/btn_dropdown.xml, res/drawable/btn_dropdown_normal.9.png, res/values-ja/arrays.xml, res/values/styles.xml, res/values/arrays.xml, res/menu/options_menu_list_events.xml, res/values-es/arrays.xml: changes in the themes. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
3a74b003d0
commit
824962224f
|
@ -1,3 +1,18 @@
|
|||
2013-11-05 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* src/pandroid_event_viewer/pandorafms/EventList.java,
|
||||
src/pandroid_event_viewer/pandorafms/Main.java,
|
||||
src/pandroid_event_viewer/pandorafms/Options.java,
|
||||
src/pandroid_event_viewer/pandorafms/PandroidEventviewerActivity.java,
|
||||
res/drawable-ldpi/save.png, res/drawable-ldpi/icon_filter.png,
|
||||
res/drawable-ldpi/icon_refresh.png, res/layout/main.xml,
|
||||
res/layout/options.xml, res/drawable/btn_dropdown_pressed.9.png,
|
||||
res/drawable/btn_dropdown.xml,
|
||||
res/drawable/btn_dropdown_normal.9.png, res/values-ja/arrays.xml,
|
||||
res/values/styles.xml, res/values/arrays.xml,
|
||||
res/menu/options_menu_list_events.xml, res/values-es/arrays.xml:
|
||||
changes in the themes.
|
||||
|
||||
2013-11-04 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* src/pandroid_event_viewer/pandorafms/EventList.java,
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/btn_dropdown_normal" />
|
||||
<item android:state_pressed="true" android:drawable="@drawable/btn_dropdown_pressed" />
|
||||
<item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/btn_dropdown_pressed" />
|
||||
<item android:state_enabled="true" android:drawable="@drawable/btn_dropdown_normal" />
|
||||
<item android:drawable="@drawable/btn_dropdown_normal" />
|
||||
</selector>
|
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
|
@ -25,14 +25,19 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:background="#7EB628"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/refresh_icon_button_main"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:padding="0dp"
|
||||
android:src="@drawable/refrest_icon" />
|
||||
android:src="@drawable/icon_refresh" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="2px"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="#6D9624" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -44,6 +49,11 @@
|
|||
android:textColor="#ffffff"
|
||||
android:textSize="20dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="2px"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="#6D9624" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/filter_icon_button_main"
|
||||
|
@ -51,67 +61,60 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:padding="0dp"
|
||||
android:src="@drawable/filter_icon" />
|
||||
android:src="@drawable/icon_filter" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2px"
|
||||
android:background="#6D9624" />
|
||||
|
||||
<TextView
|
||||
style="@style/options_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:text="@string/profile_label_str" />
|
||||
|
||||
<LinearLayout
|
||||
style="@style/margin_pandora"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
style="@style/margin_pandora"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
<Spinner
|
||||
android:id="@+id/profile_combo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/label_pandora"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/profile_label_str" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/profile_combo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
<ImageButton
|
||||
android:id="@+id/button_delete_profile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
android:layout_weight="0"
|
||||
android:padding="0dp"
|
||||
android:src="@drawable/cross" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_set_as_filter_watcher"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/set_as_filter_watcher_button_str" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_save_profile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/save_profile_button_str" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_delete_profile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/profile_delete" />
|
||||
</LinearLayout>
|
||||
<ImageButton
|
||||
android:id="@+id/button_save_profile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:padding="0dp"
|
||||
android:src="@drawable/save" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_set_as_filter_watcher"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/set_as_filter_watcher_button_str" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dp"
|
||||
|
@ -129,85 +132,55 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
<TextView
|
||||
style="@style/label_pandora"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:paddingRight="5dip"
|
||||
android:text="@string/group_label_str" />
|
||||
|
||||
<TextView
|
||||
style="@style/label_pandora"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:paddingRight="5dip"
|
||||
android:text="@string/group_label_str" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/group_combo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/loading_group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
<Spinner
|
||||
android:id="@+id/group_combo"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
style="@style/label_pandora"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:paddingRight="5dip"
|
||||
android:text="@string/status_label_str" />
|
||||
|
||||
<TextView
|
||||
style="@style/label_pandora"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:paddingRight="5dip"
|
||||
android:text="@string/status_label_str" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/status_combo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
<Spinner
|
||||
android:id="@+id/status_combo"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
style="@style/label_pandora"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:paddingRight="5dip"
|
||||
android:text="@string/tag_label_str" />
|
||||
|
||||
<TextView
|
||||
style="@style/label_pandora"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:paddingRight="5dip"
|
||||
android:text="@string/tag_label_str" />
|
||||
<EditText
|
||||
android:id="@+id/tag_text"
|
||||
style="@style/edittext_pandora"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"
|
||||
android:visibility="gone" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/tag_text"
|
||||
style="@style/edittext_pandora"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/loading_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right" />
|
||||
</LinearLayout>
|
||||
<Spinner
|
||||
android:id="@+id/tag"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -267,59 +240,34 @@
|
|||
android:inputType="text"
|
||||
android:singleLine="true" />
|
||||
|
||||
<TableLayout
|
||||
<TextView
|
||||
style="@style/label_pandora"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:paddingRight="5dip"
|
||||
android:text="@string/severity_label_str" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/severity_combo"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TableRow>
|
||||
<TextView
|
||||
style="@style/label_pandora"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:paddingRight="5dip"
|
||||
android:text="@string/max_time_old_event_str" />
|
||||
|
||||
<TextView
|
||||
style="@style/label_pandora"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:paddingRight="5dip"
|
||||
android:text="@string/severity_label_str" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/severity_combo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
|
||||
<TextView
|
||||
style="@style/label_pandora"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:paddingRight="5dip"
|
||||
android:text="@string/max_time_old_event_str" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/max_time_old_event_combo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
<Spinner
|
||||
android:id="@+id/max_time_old_event_combo"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
<!--
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="#ffffff" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_send"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/search_button_str" />
|
||||
-->
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -15,10 +15,36 @@
|
|||
// GNU General Public License for more details.
|
||||
-->
|
||||
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="@style/background_pandora"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#7EB628"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:padding="10dp"
|
||||
android:text="EVENT VIEWER"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20dp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
|
@ -113,9 +139,11 @@
|
|||
|
||||
<Spinner
|
||||
android:id="@+id/refresh_combo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/btn_dropdown"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
style="@style/label_pandora"
|
||||
|
@ -123,11 +151,20 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="2dp"
|
||||
android:text="@string/timeout_connections_label_str" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/timeout_connections_combo"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/btn_dropdown"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/timeout_connections"
|
||||
|
@ -293,4 +330,5 @@
|
|||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
|
@ -20,10 +20,6 @@
|
|||
android:id="@+id/options_button_menu_options"
|
||||
android:icon="@drawable/config"
|
||||
android:title="@string/label_pandora_str"/>
|
||||
<item
|
||||
android:id="@+id/refresh_button_menu_options"
|
||||
android:icon="@drawable/refresh"
|
||||
android:title="@string/refresh_label_str"/>
|
||||
<item
|
||||
android:id="@+id/about_button_menu_options"
|
||||
android:icon="@drawable/about"
|
||||
|
|
|
@ -47,7 +47,16 @@
|
|||
<item>36 horas</item>
|
||||
<item>48 horas</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Please change the code in the function timeout2arrayKey -->
|
||||
<string-array name="timeout_connections_combo">
|
||||
<item>5 segundos</item>
|
||||
<item>10 segundos</item>
|
||||
<item>20 segundos</item>
|
||||
<item>30 segundos</item>
|
||||
<item>40 segundos</item>
|
||||
<item>50 segundos</item>
|
||||
<item>1 minuto</item>
|
||||
</string-array>
|
||||
<string-array name="event_status_values">
|
||||
<!-- You must subtract -1 -->
|
||||
<!--<item>Todo los eventos</item> //The next version re-add please -->
|
||||
|
|
|
@ -47,7 +47,16 @@
|
|||
<item>36 時間</item>
|
||||
<item>48 時間</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Please change the code in the function timeout2arrayKey -->
|
||||
<string-array name="timeout_connections_combo">
|
||||
<item>5 seconds</item>
|
||||
<item>10 seconds</item>
|
||||
<item>20 seconds</item>
|
||||
<item>30 seconds</item>
|
||||
<item>40 seconds</item>
|
||||
<item>50 seconds</item>
|
||||
<item>1 minute</item>
|
||||
</string-array>
|
||||
<string-array name="event_status_values">
|
||||
<!-- You must subtract -1 -->
|
||||
<!--<item>All event</item>//The next version re-add please -->
|
||||
|
|
|
@ -49,6 +49,16 @@
|
|||
<item>36 hours</item>
|
||||
<item>48 hours</item>
|
||||
</string-array>
|
||||
<!-- Please change the code in the function timeout2arrayKey -->
|
||||
<string-array name="timeout_connections_combo">
|
||||
<item>5 seconds</item>
|
||||
<item>10 seconds</item>
|
||||
<item>20 seconds</item>
|
||||
<item>30 seconds</item>
|
||||
<item>40 seconds</item>
|
||||
<item>50 seconds</item>
|
||||
<item>1 minute</item>
|
||||
</string-array>
|
||||
<string-array name="event_status_values">
|
||||
|
||||
<!-- You must subtract -1 -->
|
||||
|
@ -82,7 +92,7 @@
|
|||
<item>2 weeks</item>
|
||||
<item>1 month</item>
|
||||
</string-array>
|
||||
<!--
|
||||
<!--
|
||||
<string-array name="incident_priority">
|
||||
<item>Informative</item>
|
||||
<item>Low</item>
|
||||
|
@ -109,6 +119,6 @@
|
|||
<item>Expired incidents</item>
|
||||
<item>Closed incidents</item>
|
||||
</string-array>
|
||||
-->
|
||||
-->
|
||||
|
||||
</resources>
|
|
@ -32,7 +32,7 @@
|
|||
<style name="edittext_pandora">
|
||||
<item name="android:textColor">#2C2C2C</item>
|
||||
<item name="android:textSize">14dp</item>
|
||||
<item name="android:padding">5dp</item>
|
||||
<item name="android:padding">7dp</item>
|
||||
<item name="android:background">@drawable/edittext_pandora_colors_states</item>
|
||||
<item name="android:layout_marginTop">5dp</item>
|
||||
<item name="android:layout_marginBottom">5dp</item>
|
||||
|
|
|
@ -210,13 +210,6 @@ public class EventList extends ListActivity {
|
|||
case R.id.options_button_menu_options:
|
||||
startActivity(new Intent(this, Options.class));
|
||||
break;
|
||||
case R.id.refresh_button_menu_options:
|
||||
this.object.loadInProgress = true;
|
||||
this.object.getNewListEvents = true;
|
||||
this.object.eventList = new ArrayList<EventListItem>();
|
||||
this.toggleLoadingLayout();
|
||||
this.object.executeBackgroundGetEvents(true);
|
||||
break;
|
||||
case R.id.about_button_menu_options:
|
||||
i = new Intent(this, About.class);
|
||||
startActivity(i);
|
||||
|
|
|
@ -104,8 +104,8 @@ public class Main extends Activity {
|
|||
setContentView(R.layout.main);
|
||||
final Button buttonSetAsFilterWatcher = (Button) findViewById(R.id.button_set_as_filter_watcher);
|
||||
final ImageButton buttonSearch = (ImageButton) findViewById(R.id.refresh_icon_button_main);
|
||||
final Button buttonDeleteProfile = (Button) findViewById(R.id.button_delete_profile);
|
||||
final Button buttonSaveProfile = (Button) findViewById(R.id.button_save_profile);
|
||||
final ImageButton buttonDeleteProfile = (ImageButton) findViewById(R.id.button_delete_profile);
|
||||
final ImageButton buttonSaveProfile = (ImageButton) findViewById(R.id.button_save_profile);
|
||||
// Check if the user preferences it is set.
|
||||
if (object.user.length() == 0 || object.password.length() == 0
|
||||
|| object.url.length() == 0) {
|
||||
|
@ -286,8 +286,6 @@ public class Main extends Activity {
|
|||
if (version402) {
|
||||
((EditText) findViewById(R.id.tag_text))
|
||||
.setVisibility(View.VISIBLE);
|
||||
((ProgressBar) findViewById(R.id.loading_tag))
|
||||
.setVisibility(View.GONE);
|
||||
((Spinner) findViewById(R.id.tag)).setVisibility(View.GONE);
|
||||
}
|
||||
else {
|
||||
|
@ -317,8 +315,6 @@ public class Main extends Activity {
|
|||
|
||||
@Override
|
||||
protected void onPostExecute(Boolean result) {
|
||||
ProgressBar loadingGroup = (ProgressBar) findViewById(R.id.loading_group);
|
||||
loadingGroup.setVisibility(ProgressBar.GONE);
|
||||
if (result) {
|
||||
Spinner combo = (Spinner) findViewById(R.id.group_combo);
|
||||
|
||||
|
@ -336,8 +332,8 @@ public class Main extends Activity {
|
|||
|
||||
Button buttonSaveAsFilterWatcher = (Button) findViewById(R.id.button_set_as_filter_watcher);
|
||||
ImageButton buttonSearch = (ImageButton) findViewById(R.id.filter_icon_button_main);
|
||||
Button buttonDeleteProfile = (Button) findViewById(R.id.button_delete_profile);
|
||||
Button buttonSaveProfile = (Button) findViewById(R.id.button_save_profile);
|
||||
ImageButton buttonDeleteProfile = (ImageButton) findViewById(R.id.button_delete_profile);
|
||||
ImageButton buttonSaveProfile = (ImageButton) findViewById(R.id.button_save_profile);
|
||||
|
||||
buttonSaveAsFilterWatcher.setEnabled(true);
|
||||
buttonSearch.setEnabled(true);
|
||||
|
@ -395,8 +391,6 @@ public class Main extends Activity {
|
|||
}
|
||||
}
|
||||
}
|
||||
ProgressBar loadingGroup = (ProgressBar) findViewById(R.id.loading_tag);
|
||||
loadingGroup.setVisibility(ProgressBar.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -96,6 +96,18 @@ public class Options extends Activity {
|
|||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
combo.setAdapter(adapter);
|
||||
combo.setSelection(preferences.getInt("refreshTimeKey", 3));
|
||||
|
||||
|
||||
|
||||
combo = (Spinner) findViewById(R.id.timeout_connections_combo);
|
||||
adapter = ArrayAdapter.createFromResource(
|
||||
this, R.array.timeout_connections_combo,
|
||||
android.R.layout.simple_spinner_item);
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
combo.setAdapter(adapter);
|
||||
int key_seconds = this.timeout2arrayKey(preferences.getInt("timeout_connections", 10));
|
||||
combo.setSelection(key_seconds);
|
||||
|
||||
((CheckBox) findViewById(R.id.background_service_on)).setChecked(true);
|
||||
final Button button = (Button) findViewById(R.id.update_options);
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
|
@ -160,6 +172,67 @@ public class Options extends Activity {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int timeout2arrayKey(int seconds) {
|
||||
int key = 1;
|
||||
switch (seconds) {
|
||||
case 5:
|
||||
key = 0;
|
||||
break;
|
||||
case 10:
|
||||
key = 1;
|
||||
break;
|
||||
case 20:
|
||||
key = 2;
|
||||
break;
|
||||
case 30:
|
||||
key = 3;
|
||||
break;
|
||||
case 40:
|
||||
key = 4;
|
||||
break;
|
||||
case 50:
|
||||
key = 5;
|
||||
break;
|
||||
case 60:
|
||||
key = 6;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return key;
|
||||
}
|
||||
|
||||
|
||||
private int arrayKey2timeout(int key) {
|
||||
int seconds = 10;
|
||||
switch (key) {
|
||||
case 0:
|
||||
seconds = 5;
|
||||
break;
|
||||
case 1:
|
||||
seconds = 10;
|
||||
break;
|
||||
case 2:
|
||||
seconds = 20;
|
||||
break;
|
||||
case 3:
|
||||
seconds = 30;
|
||||
break;
|
||||
case 4:
|
||||
seconds = 40;
|
||||
break;
|
||||
case 5:
|
||||
seconds = 50;
|
||||
break;
|
||||
case 6:
|
||||
seconds = 60;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return seconds;
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves all options
|
||||
|
@ -173,12 +246,14 @@ public class Options extends Activity {
|
|||
asyncTask = new CheckCertificateAsyncTask();
|
||||
asyncTask.execute(new URL[] { new URL(url) });
|
||||
removeDialog(DIALOG_TIME, retrievingCertificate);
|
||||
} catch (MalformedURLException e) {
|
||||
}
|
||||
catch (MalformedURLException e) {
|
||||
Toast.makeText(getApplicationContext(), R.string.url_not_valid,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
writeChanges();
|
||||
}
|
||||
}
|
||||
|
@ -206,6 +281,11 @@ public class Options extends Activity {
|
|||
Spinner combo = (Spinner) findViewById(R.id.refresh_combo);
|
||||
editorPreferences.putInt("refreshTimeKey",
|
||||
combo.getSelectedItemPosition());
|
||||
|
||||
combo = (Spinner) findViewById(R.id.timeout_connections_combo);
|
||||
editorPreferences.putInt("timeout_connections",
|
||||
arrayKey2timeout(combo.getSelectedItemPosition()));
|
||||
|
||||
|
||||
// Notification settings
|
||||
CheckBox cb = (CheckBox) findViewById(R.id.vibration_on);
|
||||
|
@ -226,7 +306,8 @@ public class Options extends Activity {
|
|||
connectionStatus.setCompoundDrawablesWithIntrinsicBounds(0, 0,
|
||||
0, R.drawable.help);
|
||||
new CheckConnectionAsyncTask().execute();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
Toast toast = Toast.makeText(context,
|
||||
this.getString(R.string.config_update_fail_str),
|
||||
Toast.LENGTH_LONG);
|
||||
|
@ -235,7 +316,8 @@ public class Options extends Activity {
|
|||
// Enable or disable background checking
|
||||
if (((CheckBox) findViewById(R.id.background_service_on)).isChecked()) {
|
||||
Core.setBackgroundServiceFetchFrequency(getApplicationContext());
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
Core.cancelBackgroundService(getApplicationContext());
|
||||
}
|
||||
|
||||
|
|
|
@ -37,9 +37,7 @@ import android.content.res.Configuration;
|
|||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.TabHost;
|
||||
import android.widget.Toast;
|
||||
public class PandroidEventviewerActivity extends TabActivity implements
|
||||
|
|
Loading…
Reference in New Issue