我是新來的片段,並一直在試圖解決這個好幾天。我想有我片段在列表視圖點擊更新,並且極其類似: Fragment in fragment do not refresh 那裏既是左邊列表視圖和右側的標籤UI。這是我的一個片段:刷新上ListView項片段點擊
public static class DescriptionFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_section_description, container, false);
text = ((TextView) rootView.findViewById(R.id.description));
text.setText(Html.fromHtml(description_text));
return rootView;
}
我怎麼能叫這個片段(從主要活動中),所以onCreateView被更新和TextView的「文本」更新?任何幫助是極大的讚賞
注:列表視圖不是一個片段,只是平板電腦一個單獨的佈局文件。我唯一的片段(如DescriptionFragment)是標籤
http://android-er.blogspot.in/2011/12/access-view-inside-fragment-from.html。可能會幫助 – Raghunandan