commit
501f848e40
2 changed files with 19 additions and 3 deletions
|
@ -124,11 +124,18 @@ public class SherpafySelectToursFragment extends SherlockListFragment {
|
|||
LayoutInflater inflater = getActivity().getLayoutInflater();
|
||||
row = inflater.inflate(R.layout.sherpafy_list_tour_item, parent, false);
|
||||
}
|
||||
|
||||
final TourInformation ti = getItem(position);
|
||||
TextView description = (TextView) row.findViewById(R.id.TourDescription);
|
||||
TextView name = (TextView) row.findViewById(R.id.TourName);
|
||||
TextView moreInformation = (TextView) row.findViewById(R.id.MoreInformation);
|
||||
SpannableString content = new SpannableString(getString(R.string.sherpafy_more_information));
|
||||
row.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
((TourViewActivity) getActivity()).selectMenu( ti);
|
||||
}
|
||||
});
|
||||
content.setSpan(new ClickableSpan() {
|
||||
@Override
|
||||
public void onClick(View widget) {
|
||||
|
|
|
@ -108,8 +108,7 @@ public class TourViewActivity extends SherlockFragmentActivity {
|
|||
}
|
||||
});
|
||||
|
||||
displaySize = new Point();
|
||||
getWindowManager().getDefaultDisplay().getSize(displaySize);
|
||||
displaySize = new Point(getWindowManager().getDefaultDisplay().getWidth(), getWindowManager().getDefaultDisplay().getHeight());
|
||||
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.drawable.ic_navigation_drawer_light,
|
||||
R.string.default_buttons_other_actions, R.string.close);
|
||||
if (getMyApplication().isApplicationInitializing()) {
|
||||
|
@ -120,6 +119,16 @@ public class TourViewActivity extends SherlockFragmentActivity {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (state == STATE_SELECT_TOUR){
|
||||
super.onBackPressed();
|
||||
} else if (state == STATE_TOUR_VIEW){
|
||||
selectMenu(R.string.sherpafy_tours);
|
||||
} else if (state == STATE_STAGE_OVERVIEW){
|
||||
selectMenu(customization.getSelectedTour());
|
||||
}
|
||||
}
|
||||
|
||||
private ArrayAdapter<Object> setupAdapter() {
|
||||
return new ArrayAdapter<Object>(this, R.layout.sherpafy_drawer_list_item){
|
||||
|
|
Loading…
Reference in a new issue