private String getSearchHint(UriData data) { if (data.targetType == UriData.TYPE_MANUFACTURER) { return getString(R.string.db_search_hint_manufacturers); } else if (data.targetType == UriData.TYPE_IR_CODE) { return getString(R.string.db_search_hint_buttons); } else { return getString(R.string.db_search_hint_custom, data.getFullyQualifiedName(" ")); } }
@Override public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { setHasOptionsMenu(true); setCurrentType(mUriData.targetType); View rootView = inflater.inflate(R.layout.fragment_listable, container, false); mListView = (ListView) rootView.findViewById(R.id.lvElements); mListView.setOnItemClickListener(this); mListView.setOnItemLongClickListener(this); mConnector = new DBConnector(getActivity(), this); // Adapter stuff if (mCreated) { mListView.setAdapter(mAdapter); mAdapter.restoreOriginalDataSet(); } else if (mUriData.isAvailableInCache(getActivity())) { queryServer(false); } else { queryServer(true); } explainSaveRemote(); explainSelectCodesets(); String title = mUriData.getFullyQualifiedName(" > "); if (title == null) { title = getString(R.string.db_select_manufacturer); } getActivity().setTitle(title); mCreated = true; return rootView; }