我不知道如何获得条件方法的捆绑密钥和/下面的 Toast 消息。
对于我的学习经验,我们将不胜感激任何帮助。谢谢。
public class ListViewFragment extends ListFragment implements OnItemClickListener {
private final String KEY_ADPTR_ID = "KEY_ADPTR_ID";
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState):
Bundle args = this.getArguments();
args.getString(KEY_ADPTR_ID);
. . .
}
. . .
private void showData(String json) throws JSONException {
String adptrID = this.getBundle(KEY_ADPTR_ID);//<-HOW DO I ACCOMPLISH THIS CORRECTLY!!??
Toast.makeText(getActivity(), adptrID, Toast.LENGTH_SHORT).show();
if (adptrID == "3") {
. . .
}
}