2013-11-01 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/PandroidEventviewerActivity.java, res/layout/list_view_layout.xml, res/layout/main.xml: changes in the theme of app. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8998 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
273d72b050
commit
21c8f492ec
|
@ -1,3 +1,11 @@
|
||||||
|
2013-11-01 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/PandroidEventviewerActivity.java,
|
||||||
|
res/layout/list_view_layout.xml, res/layout/main.xml: changes in the
|
||||||
|
theme of app.
|
||||||
|
|
||||||
2013-10-31 Miguel de Dios <miguel.dedios@artica.es>
|
2013-10-31 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* src/pandroid_event_viewer/pandorafms/Main.java,
|
* src/pandroid_event_viewer/pandorafms/Main.java,
|
||||||
|
|
|
@ -14,51 +14,84 @@
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
-->
|
-->
|
||||||
<LinearLayout
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
android:layout_width="fill_parent"
|
||||||
android:orientation="vertical"
|
android:layout_height="fill_parent"
|
||||||
android:layout_width="fill_parent"
|
android:orientation="vertical" >
|
||||||
android:layout_height="fill_parent"
|
|
||||||
>
|
<LinearLayout
|
||||||
<LinearLayout
|
android:layout_width="fill_parent"
|
||||||
android:id="@+id/loading_layout"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:background="#7EB628"
|
||||||
android:layout_width="wrap_content"
|
android:orientation="horizontal" >
|
||||||
android:layout_height="wrap_content"
|
|
||||||
>
|
<ImageButton
|
||||||
<ProgressBar
|
android:id="@+id/refrest_icon_button_list"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="?android:attr/progressBarStyleSmall"
|
android:layout_weight="0"
|
||||||
android:paddingRight="10dip"
|
android:padding="0dp"
|
||||||
/>
|
android:src="@drawable/refrest_icon" />
|
||||||
<TextView
|
|
||||||
android:textColor="#ffffff"
|
<TextView
|
||||||
android:text="@string/loading_label_str"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="fill_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_weight="1"
|
||||||
android:textStyle="bold"
|
android:gravity="center"
|
||||||
/>
|
android:padding="10dp"
|
||||||
</LinearLayout>
|
android:text="EVENT VIEWER"
|
||||||
<LinearLayout
|
android:textColor="#ffffff"
|
||||||
android:id="@+id/empty_list_layout"
|
android:textSize="20dp"
|
||||||
android:orientation="horizontal"
|
android:textStyle="bold" />
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
<ImageButton
|
||||||
android:visibility="gone"
|
android:id="@+id/filter_icon_button_list"
|
||||||
>
|
android:layout_width="wrap_content"
|
||||||
<TextView
|
android:layout_height="wrap_content"
|
||||||
android:textColor="#ffffff"
|
android:layout_weight="0"
|
||||||
android:text="@string/empty_label_str"
|
android:padding="0dp"
|
||||||
android:layout_width="fill_parent"
|
android:src="@drawable/filter_icon" />
|
||||||
android:layout_height="wrap_content"
|
</LinearLayout>
|
||||||
android:textStyle="bold"
|
|
||||||
/>
|
<LinearLayout
|
||||||
</LinearLayout>
|
android:id="@+id/loading_layout"
|
||||||
<ListView
|
android:layout_width="wrap_content"
|
||||||
android:id="@id/android:list"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="fill_parent"
|
android:orientation="horizontal" >
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:fadingEdge="none"
|
<ProgressBar
|
||||||
/>
|
style="?android:attr/progressBarStyleSmall"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingRight="10dip" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/loading_label_str"
|
||||||
|
android:textColor="#ffffff"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/empty_list_layout"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="gone" >
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/empty_label_str"
|
||||||
|
android:textColor="#ffffff"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ListView
|
||||||
|
android:id="@id/android:list"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fadingEdge="none" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -27,7 +27,7 @@
|
||||||
android:orientation="horizontal" >
|
android:orientation="horizontal" >
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/refrest_icon_button"
|
android:id="@+id/refresh_icon_button_main"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/filter_icon_button"
|
android:id="@+id/filter_icon_button_main"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
|
|
|
@ -20,9 +20,11 @@ import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.app.ListActivity;
|
import android.app.ListActivity;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
|
import android.app.TabActivity;
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
@ -43,6 +45,7 @@ import android.view.ViewGroup;
|
||||||
import android.widget.BaseAdapter;
|
import android.widget.BaseAdapter;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
|
import android.widget.ImageButton;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
|
@ -99,9 +102,11 @@ public class EventList extends ListActivity {
|
||||||
|
|
||||||
if (object.eventList.size() == 0) {
|
if (object.eventList.size() == 0) {
|
||||||
button.setVisibility(Button.GONE);
|
button.setVisibility(Button.GONE);
|
||||||
} else if (((long) object.eventList.size()) >= object.count_events) {
|
}
|
||||||
|
else if (((long) object.eventList.size()) >= object.count_events) {
|
||||||
button.setVisibility(Button.GONE);
|
button.setVisibility(Button.GONE);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
button.setVisibility(Button.VISIBLE);
|
button.setVisibility(Button.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +114,8 @@ public class EventList extends ListActivity {
|
||||||
LinearLayout layout = (LinearLayout) findViewById(R.id.loading_layout);
|
LinearLayout layout = (LinearLayout) findViewById(R.id.loading_layout);
|
||||||
layout.setVisibility(LinearLayout.GONE);
|
layout.setVisibility(LinearLayout.GONE);
|
||||||
la.showLoadingEvents = false;
|
la.showLoadingEvents = false;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
LinearLayout layout = (LinearLayout) findViewById(R.id.loading_layout);
|
LinearLayout layout = (LinearLayout) findViewById(R.id.loading_layout);
|
||||||
layout.setVisibility(LinearLayout.GONE);
|
layout.setVisibility(LinearLayout.GONE);
|
||||||
|
|
||||||
|
@ -123,6 +129,15 @@ public class EventList extends ListActivity {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ImageButton filter_button = (ImageButton)findViewById(R.id.filter_icon_button_list);
|
||||||
|
filter_button.setOnClickListener(new View.OnClickListener() {
|
||||||
|
public void onClick(View v) {
|
||||||
|
Activity a = (Activity)v.getContext();
|
||||||
|
TabActivity ta = (TabActivity) a.getParent();
|
||||||
|
ta.getTabHost().setCurrentTab(0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
registerReceiver(onBroadcast, new IntentFilter("eventlist.java"));
|
registerReceiver(onBroadcast, new IntentFilter("eventlist.java"));
|
||||||
|
|
||||||
this.toggleLoadingLayout();
|
this.toggleLoadingLayout();
|
||||||
|
|
|
@ -103,7 +103,7 @@ public class Main extends Activity {
|
||||||
|
|
||||||
setContentView(R.layout.main);
|
setContentView(R.layout.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.filter_icon_button);
|
final ImageButton buttonSearch = (ImageButton) findViewById(R.id.refresh_icon_button_main);
|
||||||
final Button buttonDeleteProfile = (Button) findViewById(R.id.button_delete_profile);
|
final Button buttonDeleteProfile = (Button) findViewById(R.id.button_delete_profile);
|
||||||
final Button buttonSaveProfile = (Button) findViewById(R.id.button_save_profile);
|
final Button buttonSaveProfile = (Button) findViewById(R.id.button_save_profile);
|
||||||
// Check if the user preferences it is set.
|
// Check if the user preferences it is set.
|
||||||
|
@ -115,7 +115,7 @@ public class Main extends Activity {
|
||||||
toast.show();
|
toast.show();
|
||||||
|
|
||||||
buttonSetAsFilterWatcher.setEnabled(false);
|
buttonSetAsFilterWatcher.setEnabled(false);
|
||||||
buttonSearch.setEnabled(false);
|
//buttonSearch.setEnabled(false);
|
||||||
buttonDeleteProfile.setEnabled(false);
|
buttonDeleteProfile.setEnabled(false);
|
||||||
}
|
}
|
||||||
else if (object.user.equals("demo") || object.password.equals("demo")) {
|
else if (object.user.equals("demo") || object.password.equals("demo")) {
|
||||||
|
@ -124,7 +124,7 @@ public class Main extends Activity {
|
||||||
Toast.LENGTH_LONG);
|
Toast.LENGTH_LONG);
|
||||||
toast.show();
|
toast.show();
|
||||||
}
|
}
|
||||||
buttonSearch.setEnabled(false);
|
//buttonSearch.setEnabled(false);
|
||||||
buttonSetAsFilterWatcher.setEnabled(false);
|
buttonSetAsFilterWatcher.setEnabled(false);
|
||||||
buttonDeleteProfile.setEnabled(false);
|
buttonDeleteProfile.setEnabled(false);
|
||||||
|
|
||||||
|
@ -335,12 +335,15 @@ public class Main extends Activity {
|
||||||
combo.setSelection(index_combo);
|
combo.setSelection(index_combo);
|
||||||
|
|
||||||
Button buttonSaveAsFilterWatcher = (Button) findViewById(R.id.button_set_as_filter_watcher);
|
Button buttonSaveAsFilterWatcher = (Button) findViewById(R.id.button_set_as_filter_watcher);
|
||||||
ImageButton buttonSearch = (ImageButton) findViewById(R.id.filter_icon_button);
|
ImageButton buttonSearch = (ImageButton) findViewById(R.id.filter_icon_button_main);
|
||||||
Button buttonDeleteProfile = (Button) findViewById(R.id.button_delete_profile);
|
Button buttonDeleteProfile = (Button) findViewById(R.id.button_delete_profile);
|
||||||
Button buttonSaveProfile = (Button) findViewById(R.id.button_save_profile);
|
Button buttonSaveProfile = (Button) findViewById(R.id.button_save_profile);
|
||||||
|
|
||||||
buttonSaveAsFilterWatcher.setEnabled(true);
|
buttonSaveAsFilterWatcher.setEnabled(true);
|
||||||
buttonSearch.setEnabled(true);
|
buttonSearch.setEnabled(true);
|
||||||
|
|
||||||
|
Log.e("CACA", "CACA " + buttonSearch.isEnabled());
|
||||||
|
|
||||||
buttonDeleteProfile.setEnabled(true);
|
buttonDeleteProfile.setEnabled(true);
|
||||||
buttonSaveProfile.setEnabled(true);
|
buttonSaveProfile.setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,9 @@ import android.content.res.Configuration;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
import android.widget.BaseAdapter;
|
import android.widget.BaseAdapter;
|
||||||
|
import android.widget.ImageButton;
|
||||||
import android.widget.TabHost;
|
import android.widget.TabHost;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
public class PandroidEventviewerActivity extends TabActivity implements
|
public class PandroidEventviewerActivity extends TabActivity implements
|
||||||
|
@ -148,8 +150,8 @@ public class PandroidEventviewerActivity extends TabActivity implements
|
||||||
R.string.item_tab_event_list_text))
|
R.string.item_tab_event_list_text))
|
||||||
.setContent(i_event_list));
|
.setContent(i_event_list));
|
||||||
|
|
||||||
tabHost.getTabWidget().getChildAt(0).getLayoutParams().height = 45;
|
tabHost.getTabWidget().getChildAt(0).getLayoutParams().height = 0;
|
||||||
tabHost.getTabWidget().getChildAt(1).getLayoutParams().height = 45;
|
tabHost.getTabWidget().getChildAt(1).getLayoutParams().height = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
|
@ -178,7 +180,6 @@ public class PandroidEventviewerActivity extends TabActivity implements
|
||||||
executeBackgroundGetEvents(false);
|
executeBackgroundGetEvents(false);
|
||||||
this.showTabListFirstTime = false;
|
this.showTabListFirstTime = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onConfigurationChanged(Configuration newConfig) {
|
public void onConfigurationChanged(Configuration newConfig) {
|
||||||
|
@ -243,7 +244,7 @@ public class PandroidEventviewerActivity extends TabActivity implements
|
||||||
this.status = preferences.getInt("filterStatus", 3);
|
this.status = preferences.getInt("filterStatus", 3);
|
||||||
this.eventSearch = preferences.getString("filterEventSearch", "");
|
this.eventSearch = preferences.getString("filterEventSearch", "");
|
||||||
|
|
||||||
this.getTabHost().setCurrentTab(1);
|
// this.getTabHost().setCurrentTab(1);
|
||||||
|
|
||||||
this.loadInProgress = true;
|
this.loadInProgress = true;
|
||||||
this.getNewListEvents = true;
|
this.getNewListEvents = true;
|
||||||
|
|
Loading…
Reference in New Issue