mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-25 23:05:30 +02:00
[Android Event Viewer] Added a button to access the settings and improved the behaviour of the filter button
This commit is contained in:
parent
c1323d39e4
commit
d7dd37f562
@ -159,8 +159,14 @@ public class EventList extends ListActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ImageButton btnSettings = (ImageButton) findViewById(R.id.settings_icon_button_list);
|
||||||
|
// Open the settings
|
||||||
|
btnSettings.setOnClickListener(new View.OnClickListener() {
|
||||||
|
public void onClick(View v) {
|
||||||
|
startActivity(new Intent(v.getContext(), Options.class));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
registerReceiver(onBroadcast, new IntentFilter("eventlist.java"));
|
registerReceiver(onBroadcast, new IntentFilter("eventlist.java"));
|
||||||
|
|
||||||
this.toggleLoadingLayout();
|
this.toggleLoadingLayout();
|
||||||
|
@ -96,10 +96,29 @@ public class Main extends Activity {
|
|||||||
Activity.MODE_PRIVATE);
|
Activity.MODE_PRIVATE);
|
||||||
|
|
||||||
setContentView(R.layout.main);
|
setContentView(R.layout.main);
|
||||||
|
final ImageButton btnSettings = (ImageButton) findViewById(R.id.settings_icon_button_main);
|
||||||
|
final ImageButton btnFilter = (ImageButton) findViewById(R.id.filter_icon_button_main);
|
||||||
final Button buttonSetAsFilterWatcher = (Button) findViewById(R.id.button_set_as_filter_watcher);
|
final Button buttonSetAsFilterWatcher = (Button) findViewById(R.id.button_set_as_filter_watcher);
|
||||||
final ImageButton buttonSearch = (ImageButton) findViewById(R.id.refresh_icon_button_main);
|
final ImageButton buttonSearch = (ImageButton) findViewById(R.id.refresh_icon_button_main);
|
||||||
final ImageButton buttonDeleteProfile = (ImageButton) findViewById(R.id.button_delete_profile);
|
final ImageButton buttonDeleteProfile = (ImageButton) findViewById(R.id.button_delete_profile);
|
||||||
final ImageButton buttonSaveProfile = (ImageButton) findViewById(R.id.button_save_profile);
|
final ImageButton buttonSaveProfile = (ImageButton) findViewById(R.id.button_save_profile);
|
||||||
|
|
||||||
|
// Open the settings
|
||||||
|
btnSettings.setOnClickListener(new View.OnClickListener() {
|
||||||
|
public void onClick(View v) {
|
||||||
|
startActivity(new Intent(v.getContext(), Options.class));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Go to the events list
|
||||||
|
btnFilter.setOnClickListener(new View.OnClickListener() {
|
||||||
|
public void onClick(View v) {
|
||||||
|
Activity a = (Activity) v.getContext();
|
||||||
|
TabActivity ta = (TabActivity) a.getParent();
|
||||||
|
ta.getTabHost().setCurrentTab(1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Check if the user preferences it is set.
|
// Check if the user preferences it is set.
|
||||||
if (object.user.length() == 0 || object.password.length() == 0
|
if (object.user.length() == 0 || object.password.length() == 0
|
||||||
|| object.url.length() == 0) {
|
|| object.url.length() == 0) {
|
||||||
|
@ -63,8 +63,22 @@
|
|||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:padding="0dp"
|
android:padding="0dp"
|
||||||
android:src="@drawable/filter_icon_button"
|
android:src="@drawable/filter_icon_button"
|
||||||
|
android:background="@null" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="2px"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:background="#6D9624" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/settings_icon_button_list"
|
||||||
|
android:layout_width="58dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="0"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
/>
|
android:tint="@android:color/white"
|
||||||
|
android:src="@android:drawable/ic_menu_preferences" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -64,6 +64,21 @@
|
|||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:padding="0dp"
|
android:padding="0dp"
|
||||||
android:src="@drawable/icon_filter_pressed" />
|
android:src="@drawable/icon_filter_pressed" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="2px"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:background="#6D9624" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/settings_icon_button_main"
|
||||||
|
android:layout_width="58dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:background="@null"
|
||||||
|
android:tint="@android:color/white"
|
||||||
|
android:src="@android:drawable/ic_menu_preferences" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
Loading…
x
Reference in New Issue
Block a user