mirror of
https://gitlab.com/openlp/android.git
synced 2024-12-22 11:52:49 +00:00
Search UI
This commit is contained in:
parent
689c148c3f
commit
f10f016f53
@ -192,7 +192,7 @@ public class SearchFragment extends Fragment {
|
|||||||
|
|
||||||
public void populateListDisplay(String json, boolean notInError) {
|
public void populateListDisplay(String json, boolean notInError) {
|
||||||
Log.i(LOG_TAG, "populateListDisplay - entry");
|
Log.i(LOG_TAG, "populateListDisplay - entry");
|
||||||
ListView list = (ListView)getActivity().findViewById(R.id.fragmentsearchresults);
|
ListView list = (ListView)getActivity().findViewById(R.id.searchlistView);
|
||||||
final ArrayList<JSONArray> listitems = new ArrayList<JSONArray>();
|
final ArrayList<JSONArray> listitems = new ArrayList<JSONArray>();
|
||||||
if (notInError) {
|
if (notInError) {
|
||||||
try {
|
try {
|
||||||
@ -209,8 +209,9 @@ public class SearchFragment extends Fragment {
|
|||||||
|
|
||||||
final StableArrayAdapter adapter = new StableArrayAdapter(context,
|
final StableArrayAdapter adapter = new StableArrayAdapter(context,
|
||||||
android.R.layout.simple_list_item_1, listitems);
|
android.R.layout.simple_list_item_1, listitems);
|
||||||
list.setAdapter(adapter);
|
|
||||||
|
|
||||||
|
list.setAdapter(adapter);
|
||||||
|
/*
|
||||||
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -218,7 +219,7 @@ public class SearchFragment extends Fragment {
|
|||||||
int position, long id) {
|
int position, long id) {
|
||||||
final String item = (String) parent.getItemAtPosition(position);
|
final String item = (String) parent.getItemAtPosition(position);
|
||||||
Toast.makeText(context, "Item Pressed " + String.valueOf(position), Toast.LENGTH_SHORT).show();
|
Toast.makeText(context, "Item Pressed " + String.valueOf(position), Toast.LENGTH_SHORT).show();
|
||||||
/* view.animate().setDuration(2000).alpha(0)
|
view.animate().setDuration(2000).alpha(0)
|
||||||
.withEndAction(new Runnable() {
|
.withEndAction(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -226,9 +227,9 @@ public class SearchFragment extends Fragment {
|
|||||||
adapter.notifyDataSetChanged();
|
adapter.notifyDataSetChanged();
|
||||||
view.setAlpha(1);
|
view.setAlpha(1);
|
||||||
}
|
}
|
||||||
});*/
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
}); */
|
||||||
|
|
||||||
Log.i(LOG_TAG, "populateListDisplay - exit");
|
Log.i(LOG_TAG, "populateListDisplay - exit");
|
||||||
}
|
}
|
||||||
@ -261,14 +262,13 @@ public class SearchFragment extends Fragment {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
// Check if an existing view is being reused, otherwise inflate the view
|
// Check if an existing view is being reused, otherwise inflate the view
|
||||||
//if (convertView == null) {
|
if (convertView == null) {
|
||||||
// convertView = LayoutInflater.from(getContext()).inflate(R.layout.item_user, parent, false);
|
convertView = LayoutInflater.from(getContext()).inflate(R.layout.search_result, parent, false);
|
||||||
//}
|
}
|
||||||
// Lookup view for data population
|
// Lookup view for data population
|
||||||
//TextView tvHome = (TextView) convertView.findViewById(R.id.searchresultsdetails);
|
//TextView tvItem = (TextView) convertView.findViewById(R.id.searchresultsdetails);
|
||||||
// Populate the data into the template view using the data object
|
// Populate the data into the template view using the data object
|
||||||
//tvName.setText(user.name);
|
//tvItem.setText(item);
|
||||||
//tvHome.setText(user.hometown);
|
|
||||||
// Return the completed view to render on screen
|
// Return the completed view to render on screen
|
||||||
return convertView;
|
return convertView;
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical" android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingLeft="15dp"
|
||||||
|
android:paddingTop="15dp"
|
||||||
|
android:paddingRight="15dp"
|
||||||
|
>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:id="@+id/fragmentsearchlist"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content">
|
||||||
android:layout_gravity="center_horizontal|top"
|
|
||||||
android:weightSum="1"
|
|
||||||
android:paddingLeft="15dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:id="@+id/fragmentsearchdetails"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent">
|
||||||
android:weightSum="1">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -23,6 +23,8 @@
|
|||||||
android:text="Select Plugin"
|
android:text="Select Plugin"
|
||||||
android:id="@+id/search_title"
|
android:id="@+id/search_title"
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:textSize="40px"
|
||||||
|
android:height="70px"
|
||||||
android:paddingLeft="30dp"
|
android:paddingLeft="30dp"
|
||||||
android:paddingRight="30dp"/>
|
android:paddingRight="30dp"/>
|
||||||
|
|
||||||
@ -37,16 +39,16 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:id="@+id/fragmentsearchvalue"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent">
|
||||||
android:weightSum="1">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
android:text="Search Text"
|
android:text="Search Text"
|
||||||
|
android:textSize="40px"
|
||||||
|
android:height="70px"
|
||||||
android:id="@+id/search_value_desc"
|
android:id="@+id/search_value_desc"
|
||||||
android:paddingLeft="30dp"
|
android:paddingLeft="30dp"
|
||||||
android:paddingRight="30dp"/>
|
android:paddingRight="30dp"/>
|
||||||
@ -58,23 +60,31 @@
|
|||||||
android:id="@+id/search_text"
|
android:id="@+id/search_text"
|
||||||
style="@android:style/Animation.InputMethod"
|
style="@android:style/Animation.InputMethod"
|
||||||
android:layout_weight="0.87"
|
android:layout_weight="0.87"
|
||||||
android:inputType="text" />
|
android:inputType="text"
|
||||||
|
android:textSize="40px"
|
||||||
|
android:height="70px"
|
||||||
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/fragmentsearchresults"
|
|
||||||
android:weightSum="1">
|
android:weightSum="1">
|
||||||
|
|
||||||
<TextView
|
<ListView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="333dp"
|
android:layout_height="fill_parent"
|
||||||
android:id="@+id/searchresultsdetails" />
|
android:id="@+id/searchlistView"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:paddingLeft="30dp"
|
||||||
|
android:paddingRight="30dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_marginBottom="20dp"
|
||||||
|
android:textSize="40px"
|
||||||
|
android:height="70px"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user