1
I have a class 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;
}
And the Class 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;
}
How do I start the class Passeios
from the class GuiaDaCidade
?
In the way onclickListener
class GuiaDaCidade
already has +/- the theoretical idea of what I want, but does not work.
Maroni, with Guided Touring Guidethe wants to trade one for the other.. or he wants to open a new Activity that contains the new Tours Tour? You can clarify better?
– dariodm
open a new Activity that contains Tours.
– Maroni
Tours has this layout rootView = Inflater.inflate(R.layout.guia_tours, null); I would like to show you, that’s all I would like to show you .-.
– Maroni