2012-08-01 Santiago Munín <burning1@gmail.com>
* src/pandroid_event_viewer/pandorafms/Main.java: Changed some buttons. * res/layout/options.xml, res/layout/main.xml: UI changes. * res/values/strings.xml: Entry changed. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6837 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
a6fd49051c
commit
ca415287d9
|
@ -1,3 +1,9 @@
|
|||
2012-08-01 Santiago Munín <burning1@gmail.com>
|
||||
* src/pandroid_event_viewer/pandorafms/Main.java: Changed some buttons.
|
||||
* res/layout/options.xml,
|
||||
res/layout/main.xml: UI changes.
|
||||
* res/values/strings.xml: Entry changed.
|
||||
|
||||
2012-08-01 Santiago Munín <burning1@gmail.com>
|
||||
* res/layout/create_incident.xml: UI changes.
|
||||
* AndroidManifest.xml: Removed some comments and removed header from all activities.
|
||||
|
|
|
@ -38,24 +38,13 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingRight="5dip"
|
||||
android:text="@string/profile_label_str"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/profile_combo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/delete_profile"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginRight="10dp"
|
||||
android:contentDescription="@string/profile_delete"
|
||||
android:src="@drawable/cross" />
|
||||
android:layout_height="wrap_content" />
|
||||
</TableRow>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -248,10 +237,10 @@
|
|||
android:layout_height="wrap_content" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_reset"
|
||||
android:id="@+id/button_set_as_filter_watcher"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/reset_button_str" />
|
||||
android:text="@string/set_as_filter_watcher_button_str" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_send"
|
||||
|
@ -273,11 +262,11 @@
|
|||
android:text="@string/save_profile_button_str" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_set_as_filter_watcher"
|
||||
android:id="@+id/button_delete_profile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/set_as_filter_watcher_button_str" />
|
||||
android:text="@string/profile_delete" />
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -184,29 +184,38 @@
|
|||
|
||||
<TableRow>
|
||||
|
||||
<TextView android:text="@string/vibration" />
|
||||
<TextView
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="@string/vibration" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/vibration_on"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
|
||||
<TextView android:text="@string/led_flash" />
|
||||
<TextView
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="@string/led_flash" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/led_flash_on"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="63dp" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="@string/sound" />
|
||||
|
||||
<Button
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<string name="load_more_events_button_str">Load more events</string>
|
||||
<string name="empty_label_str">Empty list events</string>
|
||||
<string name="refresh_time_label_str">Refresh time</string>
|
||||
<string name="set_as_filter_watcher_button_str">Default</string>
|
||||
<string name="set_as_filter_watcher_button_str">Set background check filter</string>
|
||||
<string name="validate_event_button_str">Validate Event</string>
|
||||
<string name="config_update_succesful_str">Update configuration successful.</string>
|
||||
<string name="config_update_fail_str">Update configuration is failed.</string>
|
||||
|
|
|
@ -50,7 +50,6 @@ import android.widget.CheckBox;
|
|||
import android.widget.CompoundButton;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.Spinner;
|
||||
|
@ -95,9 +94,9 @@ public class Main extends Activity {
|
|||
}
|
||||
|
||||
setContentView(R.layout.main);
|
||||
final Button buttonReset = (Button) findViewById(R.id.button_reset);
|
||||
final Button buttonSetAsFilterWatcher = (Button) findViewById(R.id.button_set_as_filter_watcher);
|
||||
final Button buttonSearch = (Button) findViewById(R.id.button_send);
|
||||
final Button buttonbuttonSetAsFilterWatcher = (Button) findViewById(R.id.button_set_as_filter_watcher);
|
||||
final Button buttonDeleteProfile = (Button) findViewById(R.id.button_delete_profile);
|
||||
final Button buttonSaveProfile = (Button) findViewById(R.id.button_save_profile);
|
||||
// Check if the user preferences it is set.
|
||||
if (object.user.length() == 0 || object.password.length() == 0
|
||||
|
@ -107,9 +106,9 @@ public class Main extends Activity {
|
|||
Toast.LENGTH_SHORT);
|
||||
toast.show();
|
||||
|
||||
buttonReset.setEnabled(false);
|
||||
buttonSetAsFilterWatcher.setEnabled(false);
|
||||
buttonSearch.setEnabled(false);
|
||||
buttonbuttonSetAsFilterWatcher.setEnabled(false);
|
||||
buttonDeleteProfile.setEnabled(false);
|
||||
} else if (object.user.equals("demo") || object.password.equals("demo")) {
|
||||
Toast toast = Toast.makeText(this.getApplicationContext(),
|
||||
this.getString(R.string.preferences_set_demo_pandora_str),
|
||||
|
@ -117,8 +116,8 @@ public class Main extends Activity {
|
|||
toast.show();
|
||||
} else {
|
||||
buttonSearch.setEnabled(false);
|
||||
buttonReset.setEnabled(false);
|
||||
buttonbuttonSetAsFilterWatcher.setEnabled(false);
|
||||
buttonSetAsFilterWatcher.setEnabled(false);
|
||||
buttonDeleteProfile.setEnabled(false);
|
||||
|
||||
new GetGroupsAsyncTask().execute();
|
||||
if (version402) {
|
||||
|
@ -161,16 +160,6 @@ public class Main extends Activity {
|
|||
public void onNothingSelected(AdapterView<?> arg0) {
|
||||
}
|
||||
});
|
||||
((ImageView) findViewById(R.id.delete_profile))
|
||||
.setOnClickListener(new OnClickListener() {
|
||||
|
||||
public void onClick(View v) {
|
||||
String profileName = ((Spinner) findViewById(R.id.profile_combo))
|
||||
.getSelectedItem().toString();
|
||||
deleteProfile(profileName);
|
||||
loadProfiles();
|
||||
}
|
||||
});
|
||||
|
||||
combo = (Spinner) findViewById(R.id.max_time_old_event_combo);
|
||||
adapter = ArrayAdapter.createFromResource(this,
|
||||
|
@ -180,9 +169,9 @@ public class Main extends Activity {
|
|||
combo.setAdapter(adapter);
|
||||
combo.setSelection(preferences.getInt("filterLastTime", 6));
|
||||
|
||||
buttonReset.setOnClickListener(new View.OnClickListener() {
|
||||
buttonSetAsFilterWatcher.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
reset_form();
|
||||
save_filter_watcher();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -192,13 +181,15 @@ public class Main extends Activity {
|
|||
}
|
||||
});
|
||||
|
||||
buttonbuttonSetAsFilterWatcher
|
||||
.setOnClickListener(new View.OnClickListener() {
|
||||
buttonDeleteProfile.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
public void onClick(View v) {
|
||||
save_filter_watcher();
|
||||
}
|
||||
});
|
||||
public void onClick(View v) {
|
||||
String profileName = ((Spinner) findViewById(R.id.profile_combo))
|
||||
.getSelectedItem().toString();
|
||||
deleteProfile(profileName);
|
||||
loadProfiles();
|
||||
}
|
||||
});
|
||||
buttonSaveProfile.setOnClickListener(new OnClickListener() {
|
||||
|
||||
public void onClick(View v) {
|
||||
|
@ -336,13 +327,15 @@ public class Main extends Activity {
|
|||
combo.setAdapter(spinnerArrayAdapter);
|
||||
combo.setSelection(0);
|
||||
|
||||
Button buttonReset = (Button) findViewById(R.id.button_reset);
|
||||
Button buttonSaveAsFilterWatcher = (Button) findViewById(R.id.button_set_as_filter_watcher);
|
||||
Button buttonSearch = (Button) findViewById(R.id.button_send);
|
||||
Button buttonbuttonSetAsFilterWatcher = (Button) findViewById(R.id.button_set_as_filter_watcher);
|
||||
Button buttonDeleteProfile = (Button) findViewById(R.id.button_delete_profile);
|
||||
Button buttonSaveProfile = (Button) findViewById(R.id.button_save_profile);
|
||||
|
||||
buttonReset.setEnabled(true);
|
||||
buttonSaveAsFilterWatcher.setEnabled(true);
|
||||
buttonSearch.setEnabled(true);
|
||||
buttonbuttonSetAsFilterWatcher.setEnabled(true);
|
||||
buttonDeleteProfile.setEnabled(true);
|
||||
buttonSaveProfile.setEnabled(true);
|
||||
} else {
|
||||
// Only this task will show the toast in order to prevent a
|
||||
// message repeated.
|
||||
|
@ -546,36 +539,6 @@ public class Main extends Activity {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the filter form.
|
||||
*
|
||||
*/
|
||||
private void reset_form() {
|
||||
Spinner combo = (Spinner) findViewById(R.id.group_combo);
|
||||
combo.setSelection(0);
|
||||
combo = (Spinner) findViewById(R.id.status_combo);
|
||||
combo.setSelection(3);
|
||||
if (version402) {
|
||||
((EditText) findViewById(R.id.tag_text)).setText("");
|
||||
} else {
|
||||
combo = (Spinner) findViewById(R.id.tag);
|
||||
combo.setSelection(0);
|
||||
}
|
||||
|
||||
EditText text = (EditText) findViewById(R.id.agent_name);
|
||||
text.setText("");
|
||||
|
||||
combo = (Spinner) findViewById(R.id.severity_combo);
|
||||
combo.setSelection(0);
|
||||
|
||||
combo = (Spinner) findViewById(R.id.max_time_old_event_combo);
|
||||
combo.setSelection(6);
|
||||
|
||||
text = (EditText) findViewById(R.id.event_search_text);
|
||||
text.setText("");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears advanced options.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue