remove side tapping as clumsy/clashing with urls (closes #702)

This commit is contained in:
Andrew Dolgov 2013-05-31 19:37:20 +04:00
parent d363cb5346
commit 4057f5ac69
2 changed files with 3 additions and 75 deletions

View File

@ -423,44 +423,9 @@ public class ArticleFragment extends Fragment implements GestureDetector.OnDoubl
return false;
}
private void onLeftSideTapped() {
ArticlePager ap = (ArticlePager) m_activity.getSupportFragmentManager().findFragmentByTag(CommonActivity.FRAG_ARTICLE);
if (ap != null && ap.isAdded()) {
ap.selectArticle(false);
}
}
private void onRightSideTapped() {
ArticlePager ap = (ArticlePager) m_activity.getSupportFragmentManager().findFragmentByTag(CommonActivity.FRAG_ARTICLE);
if (ap != null && ap.isAdded()) {
ap.selectArticle(true);
}
}
@Override
public boolean onSingleTapConfirmed(MotionEvent e) {
int width = getView().getWidth();
int x = Math.round(e.getX());
if (x <= width/15) {
onLeftSideTapped();
return true;
} else if (x >= width-(width/15)) {
onRightSideTapped();
return true;
} /* else if (!m_activity.isCompatMode()) {
ActionBar bar = m_activity.getSupportActionBar();
if (bar.isShowing()) {
bar.hide();
} else {
bar.show();
}
} */
public boolean onSingleTapConfirmed(MotionEvent arg0) {
// TODO Auto-generated method stub
return false;
}
}

View File

@ -373,46 +373,9 @@ public class OfflineArticleFragment extends Fragment implements GestureDetector.
return false;
}
private void onLeftSideTapped() {
OfflineArticlePager ap = (OfflineArticlePager) m_activity.getSupportFragmentManager().findFragmentByTag(CommonActivity.FRAG_ARTICLE);
if (ap != null && ap.isAdded()) {
ap.selectArticle(false);
}
}
private void onRightSideTapped() {
OfflineArticlePager ap = (OfflineArticlePager) m_activity.getSupportFragmentManager().findFragmentByTag(CommonActivity.FRAG_ARTICLE);
if (ap != null && ap.isAdded()) {
ap.selectArticle(true);
}
}
@Override
public boolean onSingleTapConfirmed(MotionEvent e) {
int width = getView().getWidth();
int x = Math.round(e.getX());
if (x <= width/15) {
onLeftSideTapped();
return true;
} else if (x >= width-(width/15)) {
onRightSideTapped();
return true;
} /* else if (!m_activity.isCompatMode()) {
ActionBar bar = m_activity.getSupportActionBar();
if (bar.isShowing()) {
bar.hide();
} else {
bar.show();
}
} */
// TODO Auto-generated method stub
return false;
}
}