mirror of
https://gitlab.com/openlp/android.git
synced 2024-12-22 11:52:49 +00:00
handle results
This commit is contained in:
parent
9f896175b3
commit
586b269311
@ -211,25 +211,16 @@ public class SearchFragment extends Fragment {
|
||||
android.R.layout.simple_list_item_1, listitems);
|
||||
|
||||
list.setAdapter(adapter);
|
||||
/*
|
||||
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, final View view,
|
||||
int position, long id) {
|
||||
final String item = (String) parent.getItemAtPosition(position);
|
||||
Toast.makeText(context, "Item Pressed " + String.valueOf(position), Toast.LENGTH_SHORT).show();
|
||||
view.animate().setDuration(2000).alpha(0)
|
||||
.withEndAction(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
list.remove(item);
|
||||
adapter.notifyDataSetChanged();
|
||||
view.setAlpha(1);
|
||||
final JSONArray item = (JSONArray) parent.getItemAtPosition(position);
|
||||
Toast.makeText(context, "Item Pressed " + String.valueOf(position) + item,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}); */
|
||||
|
||||
Log.i(LOG_TAG, "populateListDisplay - exit");
|
||||
}
|
||||
@ -263,10 +254,11 @@ public class SearchFragment extends Fragment {
|
||||
}
|
||||
// Check if an existing view is being reused, otherwise inflate the view
|
||||
if (convertView == null) {
|
||||
convertView = LayoutInflater.from(getContext()).inflate(R.layout.search_result_row, parent, false);
|
||||
convertView = LayoutInflater.from(getContext()).inflate(R.layout.search_result_row,
|
||||
parent, false);
|
||||
}
|
||||
// Lookup view for data population
|
||||
TextView tvItem = (TextView) convertView.findViewById(R.id.searchlistRow);
|
||||
TextView tvItem = (TextView) convertView.findViewById(R.id.searchListRow);
|
||||
// Populate the data into the template view using the data object
|
||||
tvItem.setText(item);
|
||||
// Return the completed view to render on screen
|
||||
|
@ -6,8 +6,13 @@
|
||||
|
||||
<TextView android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Header"
|
||||
android:textSize="40px"
|
||||
android:height="70px"
|
||||
android:id="@+id/searchlistRow"/>
|
||||
android:textStyle="bold"
|
||||
android:textColor="#000000"
|
||||
android:textSize="40sp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:id="@+id/searchListRow"/>
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue
Block a user