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);
|
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
|
||||||
public void onItemClick(AdapterView<?> parent, final View view,
|
public void onItemClick(AdapterView<?> parent, final View view,
|
||||||
int position, long id) {
|
int position, long id) {
|
||||||
final String item = (String) parent.getItemAtPosition(position);
|
final JSONArray item = (JSONArray) parent.getItemAtPosition(position);
|
||||||
Toast.makeText(context, "Item Pressed " + String.valueOf(position), Toast.LENGTH_SHORT).show();
|
Toast.makeText(context, "Item Pressed " + String.valueOf(position) + item,
|
||||||
view.animate().setDuration(2000).alpha(0)
|
Toast.LENGTH_SHORT).show();
|
||||||
.withEndAction(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
list.remove(item);
|
|
||||||
adapter.notifyDataSetChanged();
|
|
||||||
view.setAlpha(1);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}); */
|
|
||||||
|
|
||||||
Log.i(LOG_TAG, "populateListDisplay - exit");
|
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
|
// 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.search_result_row, parent, false);
|
convertView = LayoutInflater.from(getContext()).inflate(R.layout.search_result_row,
|
||||||
|
parent, false);
|
||||||
}
|
}
|
||||||
// Lookup view for data population
|
// 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
|
// Populate the data into the template view using the data object
|
||||||
tvItem.setText(item);
|
tvItem.setText(item);
|
||||||
// Return the completed view to render on screen
|
// Return the completed view to render on screen
|
||||||
|
@ -6,8 +6,13 @@
|
|||||||
|
|
||||||
<TextView android:layout_width="wrap_content"
|
<TextView android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Header"
|
android:textStyle="bold"
|
||||||
android:textSize="40px"
|
android:textColor="#000000"
|
||||||
android:height="70px"
|
android:textSize="40sp"
|
||||||
android:id="@+id/searchlistRow"/>
|
android:paddingTop="10dp"
|
||||||
|
android:paddingRight="5dp"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:paddingBottom="10dp"
|
||||||
|
android:id="@+id/searchListRow"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
Loading…
Reference in New Issue
Block a user