Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f95d47263d
2 changed files with 19 additions and 3 deletions
|
@ -124,11 +124,18 @@ public class SherpafySelectToursFragment extends SherlockListFragment {
|
||||||
LayoutInflater inflater = getActivity().getLayoutInflater();
|
LayoutInflater inflater = getActivity().getLayoutInflater();
|
||||||
row = inflater.inflate(R.layout.sherpafy_list_tour_item, parent, false);
|
row = inflater.inflate(R.layout.sherpafy_list_tour_item, parent, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
final TourInformation ti = getItem(position);
|
final TourInformation ti = getItem(position);
|
||||||
TextView description = (TextView) row.findViewById(R.id.TourDescription);
|
TextView description = (TextView) row.findViewById(R.id.TourDescription);
|
||||||
TextView name = (TextView) row.findViewById(R.id.TourName);
|
TextView name = (TextView) row.findViewById(R.id.TourName);
|
||||||
TextView moreInformation = (TextView) row.findViewById(R.id.MoreInformation);
|
TextView moreInformation = (TextView) row.findViewById(R.id.MoreInformation);
|
||||||
SpannableString content = new SpannableString(getString(R.string.sherpafy_more_information));
|
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() {
|
content.setSpan(new ClickableSpan() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View widget) {
|
public void onClick(View widget) {
|
||||||
|
|
|
@ -108,8 +108,7 @@ public class TourViewActivity extends SherlockFragmentActivity {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
displaySize = new Point();
|
displaySize = new Point(getWindowManager().getDefaultDisplay().getWidth(), getWindowManager().getDefaultDisplay().getHeight());
|
||||||
getWindowManager().getDefaultDisplay().getSize(displaySize);
|
|
||||||
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.drawable.ic_navigation_drawer_light,
|
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.drawable.ic_navigation_drawer_light,
|
||||||
R.string.default_buttons_other_actions, R.string.close);
|
R.string.default_buttons_other_actions, R.string.close);
|
||||||
if (getMyApplication().isApplicationInitializing()) {
|
if (getMyApplication().isApplicationInitializing()) {
|
||||||
|
@ -119,7 +118,17 @@ public class TourViewActivity extends SherlockFragmentActivity {
|
||||||
showSelectedItem();
|
showSelectedItem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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() {
|
private ArrayAdapter<Object> setupAdapter() {
|
||||||
return new ArrayAdapter<Object>(this, R.layout.sherpafy_drawer_list_item){
|
return new ArrayAdapter<Object>(this, R.layout.sherpafy_drawer_list_item){
|
||||||
|
|
Loading…
Reference in a new issue