Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/fragments/ResultListFragment.java
Show First 20 Lines • Show All 180 Lines • ▼ Show 20 Lines | public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||||
} | } | ||||
} else | } else | ||||
Log.d(getString(R.string.list_fragment_debug), "No content root for fragment"); | Log.d(getString(R.string.list_fragment_debug), "No content root for fragment"); | ||||
return root; | return root; | ||||
} | } | ||||
public boolean isFragmentForTheSameStop(Palina p) { | public boolean isFragmentForTheSameStop(Palina p) { | ||||
return adapterKind.equals(FragmentKind.ARRIVALS) && getTag().equals(getFragmentTag(p)); | if (!adapterKind.equals(FragmentKind.ARRIVALS)) return false; | ||||
if (getTag() != null) | |||||
return getTag().equals(getFragmentTag(p)); | |||||
else return false; | |||||
} | } | ||||
public static String getFragmentTag(Palina p) { | public static String getFragmentTag(Palina p) { | ||||
return "palina_"+p.ID; | return "palina_"+p.ID; | ||||
} | } | ||||
@Override | @Override | ||||
▲ Show 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | public class ResultListFragment extends Fragment{ | ||||
* Set the message textView | * Set the message textView | ||||
* @param message the whole message to write in the textView | * @param message the whole message to write in the textView | ||||
*/ | */ | ||||
public void setTextViewMessage(String message) { | public void setTextViewMessage(String message) { | ||||
messageTextView.setText(message); | messageTextView.setText(message); | ||||
messageTextView.setVisibility(View.VISIBLE); | messageTextView.setVisibility(View.VISIBLE); | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register