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>
|
||||
|
||||
* src/pandroid_event_viewer/pandorafms/Main.java,
|
||||
|
|
|
@ -14,51 +14,84 @@
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
-->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
>
|
||||
<LinearLayout
|
||||
android:id="@+id/loading_layout"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
<ProgressBar
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
style="?android:attr/progressBarStyleSmall"
|
||||
android:paddingRight="10dip"
|
||||
/>
|
||||
<TextView
|
||||
android:textColor="#ffffff"
|
||||
android:text="@string/loading_label_str"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/empty_list_layout"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
>
|
||||
<TextView
|
||||
android:textColor="#ffffff"
|
||||
android:text="@string/empty_label_str"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<ListView
|
||||
android:id="@id/android:list"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fadingEdge="none"
|
||||
/>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#7EB628"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/refrest_icon_button_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:padding="0dp"
|
||||
android:src="@drawable/refrest_icon" />
|
||||
|
||||
<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" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/filter_icon_button_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:padding="0dp"
|
||||
android:src="@drawable/filter_icon" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/loading_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<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>
|
|
@ -27,7 +27,7 @@
|
|||
android:orientation="horizontal" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/refrest_icon_button"
|
||||
android:id="@+id/refresh_icon_button_main"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
|
@ -46,7 +46,7 @@
|
|||
android:textStyle="bold" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/filter_icon_button"
|
||||
android:id="@+id/filter_icon_button_main"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
|
|
|
@ -20,9 +20,11 @@ import java.io.IOException;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.app.ListActivity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.app.TabActivity;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
@ -43,6 +45,7 @@ import android.view.ViewGroup;
|
|||
import android.widget.BaseAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.RelativeLayout;
|
||||
|
@ -99,9 +102,11 @@ public class EventList extends ListActivity {
|
|||
|
||||
if (object.eventList.size() == 0) {
|
||||
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);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
button.setVisibility(Button.VISIBLE);
|
||||
}
|
||||
|
||||
|
@ -109,7 +114,8 @@ public class EventList extends ListActivity {
|
|||
LinearLayout layout = (LinearLayout) findViewById(R.id.loading_layout);
|
||||
layout.setVisibility(LinearLayout.GONE);
|
||||
la.showLoadingEvents = false;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
LinearLayout layout = (LinearLayout) findViewById(R.id.loading_layout);
|
||||
layout.setVisibility(LinearLayout.GONE);
|
||||
|
||||
|
@ -122,6 +128,15 @@ public class EventList extends ListActivity {
|
|||
la.notifyDataSetChanged();
|
||||
}
|
||||
};
|
||||
|
||||
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"));
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ 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.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 buttonSaveProfile = (Button) findViewById(R.id.button_save_profile);
|
||||
// Check if the user preferences it is set.
|
||||
|
@ -115,7 +115,7 @@ public class Main extends Activity {
|
|||
toast.show();
|
||||
|
||||
buttonSetAsFilterWatcher.setEnabled(false);
|
||||
buttonSearch.setEnabled(false);
|
||||
//buttonSearch.setEnabled(false);
|
||||
buttonDeleteProfile.setEnabled(false);
|
||||
}
|
||||
else if (object.user.equals("demo") || object.password.equals("demo")) {
|
||||
|
@ -124,7 +124,7 @@ public class Main extends Activity {
|
|||
Toast.LENGTH_LONG);
|
||||
toast.show();
|
||||
}
|
||||
buttonSearch.setEnabled(false);
|
||||
//buttonSearch.setEnabled(false);
|
||||
buttonSetAsFilterWatcher.setEnabled(false);
|
||||
buttonDeleteProfile.setEnabled(false);
|
||||
|
||||
|
@ -335,12 +335,15 @@ public class Main extends Activity {
|
|||
combo.setSelection(index_combo);
|
||||
|
||||
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 buttonSaveProfile = (Button) findViewById(R.id.button_save_profile);
|
||||
|
||||
buttonSaveAsFilterWatcher.setEnabled(true);
|
||||
buttonSearch.setEnabled(true);
|
||||
|
||||
Log.e("CACA", "CACA " + buttonSearch.isEnabled());
|
||||
|
||||
buttonDeleteProfile.setEnabled(true);
|
||||
buttonSaveProfile.setEnabled(true);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,9 @@ 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
|
||||
|
@ -148,8 +150,8 @@ public class PandroidEventviewerActivity extends TabActivity implements
|
|||
R.string.item_tab_event_list_text))
|
||||
.setContent(i_event_list));
|
||||
|
||||
tabHost.getTabWidget().getChildAt(0).getLayoutParams().height = 45;
|
||||
tabHost.getTabWidget().getChildAt(1).getLayoutParams().height = 45;
|
||||
tabHost.getTabWidget().getChildAt(0).getLayoutParams().height = 0;
|
||||
tabHost.getTabWidget().getChildAt(1).getLayoutParams().height = 0;
|
||||
}
|
||||
|
||||
public void onResume() {
|
||||
|
@ -178,7 +180,6 @@ public class PandroidEventviewerActivity extends TabActivity implements
|
|||
executeBackgroundGetEvents(false);
|
||||
this.showTabListFirstTime = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
|
@ -243,7 +244,7 @@ public class PandroidEventviewerActivity extends TabActivity implements
|
|||
this.status = preferences.getInt("filterStatus", 3);
|
||||
this.eventSearch = preferences.getString("filterEventSearch", "");
|
||||
|
||||
this.getTabHost().setCurrentTab(1);
|
||||
// this.getTabHost().setCurrentTab(1);
|
||||
|
||||
this.loadInProgress = true;
|
||||
this.getNewListEvents = true;
|
||||
|
|
Loading…
Reference in New Issue