//Imports
Tenho uma classe GuiaDaCidade extends Fragments.
public class GuiaDaCidade extends Fragment {GuiaDaCidade
.
public class GuiaDaCidade extends Fragment {
View rootView;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.guia_da_cidade, null);
View botaoPasseios = (View) rootView.findViewById(R.id.btpasseios);
View botaoAgenda = (View) rootView.findViewById(R.id.btagenda);
botaoPasseios.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
startActivity(new Intent(getActivity(),Passeios.class)); ///O que fazer aqui?
}
});
botaoAgenda.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Uri uri = Uri.parse("http://www.agendanatal.com.br");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
}
});
return rootView;
}
TenhoE a Classe Passeios extends fragments
public class Passeios extends Fragment {Passeios
:
public class Passeios extends Fragment {
private ArrayList<HashMap<String, String>> list;
private ExpandableListAdapter listAdapter;
private ExpandableListView expListView;
private List<String> listDataHeader;
private HashMap<String, List<String>> listDataChild;
private WebView webView;
private View rootView;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.guia_passeios, null);
expListView = (ExpandableListView) rootView.findViewById(R.id.listaexp);
prepareListData();
listAdapter = new ExpandableListAdapter(getActivity(), listDataHeader, listDataChild);
expListView.setAdapter(listAdapter);
expandeAll();
expListView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() {
@Override
public boolean onChildClick(ExpandableListView parent, View v,
int groupPosition, int childPosition, long id) {
mudaTela(groupPosition, childPosition);
return false;
}
});
return rootView;
}
Como faco para iniciar a classe PasseiosPasseios
a partir da classe GuiaDaCidadeGuiaDaCidade
? no
No metodo onclickListeneronclickListener
da classe GuiaDaCidadeGuiaDaCidade
ja tem +/- a ideia teoricateórica do que quero, porem naonão funciona.