Remove view background caching, Add a search clear
This commit is contained in:
parent
2c8446c3d1
commit
4ca0252734
|
@ -54,7 +54,6 @@ import java.util.Locale;
|
|||
public class FileBrowser extends Fragment {
|
||||
|
||||
private Vibrator vib;
|
||||
private Drawable orig_bg;
|
||||
private boolean games;
|
||||
private String searchQuery = null;
|
||||
private OnItemSelectedListener mCallback;
|
||||
|
@ -312,8 +311,6 @@ public class FileBrowser extends Fragment {
|
|||
|
||||
childview.setTag(null);
|
||||
|
||||
orig_bg = childview.getBackground();
|
||||
|
||||
childview.findViewById(R.id.childview).setOnClickListener(
|
||||
new OnClickListener() {
|
||||
public void onClick(View view) {
|
||||
|
@ -324,6 +321,25 @@ public class FileBrowser extends Fragment {
|
|||
});
|
||||
((ViewGroup) view).addView(childview);
|
||||
}
|
||||
if (searchQuery != null) {
|
||||
final View childview = getActivity().getLayoutInflater().inflate(
|
||||
R.layout.bios_list_item, null, false);
|
||||
|
||||
((TextView) childview.findViewById(R.id.item_name)).setText(R.string.clear_search);
|
||||
((ImageView) childview.findViewById(R.id.item_icon)).setImageResource(R.mipmap.disk_unknown);
|
||||
|
||||
childview.setTag(null);
|
||||
|
||||
childview.findViewById(R.id.childview).setOnClickListener(
|
||||
new OnClickListener() {
|
||||
public void onClick(View view) {
|
||||
searchQuery = null;
|
||||
new LocateGames(FileBrowser.this,
|
||||
R.array.images).execute(game_directory);
|
||||
}
|
||||
});
|
||||
((ViewGroup) view).addView(childview);
|
||||
}
|
||||
|
||||
final View headerView = getActivity().getLayoutInflater().inflate(
|
||||
R.layout.browser_fragment_header, null, false);
|
||||
|
@ -343,7 +359,6 @@ public class FileBrowser extends Fragment {
|
|||
|
||||
XMLParser xmlParser = new XMLParser(game, index, mPrefs);
|
||||
xmlParser.setViewParent(getActivity(), childview, mCallback);
|
||||
orig_bg = childview.getBackground();
|
||||
|
||||
childview.findViewById(R.id.childview).setOnClickListener(
|
||||
new OnClickListener() {
|
||||
|
@ -473,8 +488,6 @@ public class FileBrowser extends Fragment {
|
|||
|
||||
childview.setTag(file);
|
||||
|
||||
browser.get().orig_bg = childview.getBackground();
|
||||
|
||||
// vw.findViewById(R.id.childview).setBackgroundColor(0xFFFFFFFF);
|
||||
|
||||
childview.findViewById(R.id.childview).setOnClickListener(
|
||||
|
|
|
@ -193,7 +193,7 @@ public class MainActivity extends AppCompatActivity implements
|
|||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean onQueryTextChange(String s) {
|
||||
public boolean onQueryTextChange(String query) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -74,6 +74,7 @@
|
|||
|
||||
<string name="games_listing">Game List</string>
|
||||
<string name="search_hint">Game (ie. Crazy Taxi)</string>
|
||||
<string name="clear_search">Clear Search Results</string>
|
||||
|
||||
<string name="game_details">Game Info - %1$s</string>
|
||||
<string name="info_unavailable">Game Info Unavailable</string>
|
||||
|
|
Loading…
Reference in New Issue