Android Open Source - Peterson H H List View






From Project

Back to project page Peterson.

License

The source code is released under:

GNU General Public License

If you think the Android project Peterson listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*******************************************************************************
 * Copyright (c) 2013 Zheng Sun./*from   w w w  .j  a  v  a2 s  .  co  m*/
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * 
 * Contributors:
 *     Zheng Sun - initial API and implementation
 ******************************************************************************/

package tv.huohua.peterson.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ListView;

public class HHListView extends ListView {
  private boolean interceptTouchEventAllowed;

  public HHListView(final Context context) {
    super(context);
    init();
  }

  public HHListView(final Context context, final AttributeSet attrs) {
    super(context, attrs);
    init();
  }

  public HHListView(final Context context, final AttributeSet attrs, final int defStyle) {
    super(context, attrs, defStyle);
    init();
  }

  private void init() {
    interceptTouchEventAllowed = true;
  }

  public boolean isInterceptTouchEventAllowed() {
    return interceptTouchEventAllowed;
  }

  @Override
  public boolean onInterceptTouchEvent(final MotionEvent event) {
    return (interceptTouchEventAllowed) ? super.onInterceptTouchEvent(event) : false;
  }

  public void setInterceptTouchEventAllowed(boolean interceptTouchEventAllowed) {
    this.interceptTouchEventAllowed = interceptTouchEventAllowed;
  }
}




Java Source Code List

tv.huohua.peterson.api.AbsApi.java
tv.huohua.peterson.api.AbsListApi.java
tv.huohua.peterson.api.ApiCallResponse.java
tv.huohua.peterson.misc.ApplicationUtils.java
tv.huohua.peterson.misc.DeviceUtils.java
tv.huohua.peterson.misc.IOUtils.java
tv.huohua.peterson.misc.JavaLangUtils.java
tv.huohua.peterson.misc.Pair.java
tv.huohua.peterson.network.HttpRequest.java
tv.huohua.peterson.network.NetworkMgr.java
tv.huohua.peterson.network.NetworkUtils.java
tv.huohua.peterson.social.ISocialAuthorizer.java
tv.huohua.peterson.social.TencentWeiboAccessTokenKeeper.java
tv.huohua.peterson.social.TencentWeiboAuthorizer.java
tv.huohua.peterson.social.WeiboAccessTokenKeeper.java
tv.huohua.peterson.social.WeiboApiCaller.java
tv.huohua.peterson.social.WeiboAuthorizer.java
tv.huohua.peterson.view.FixedAspectRatioImageView.java
tv.huohua.peterson.view.FixedAspectRatioRelativeLayout.java
tv.huohua.peterson.view.HHListView.java
tv.huohua.peterson.view.HorizontalPagerListener.java
tv.huohua.peterson.view.HorizontalPager.java