本文整理汇总了Java中com.lorentzos.flingswipe.SwipeFlingAdapterView类的典型用法代码示例。如果您正苦于以下问题:Java SwipeFlingAdapterView类的具体用法?Java SwipeFlingAdapterView怎么用?Java SwipeFlingAdapterView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SwipeFlingAdapterView类属于com.lorentzos.flingswipe包,在下文中一共展示了SwipeFlingAdapterView类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initView
import com.lorentzos.flingswipe.SwipeFlingAdapterView; //导入依赖的package包/类
private void initView() {
DisplayMetrics dm = getResources().getDisplayMetrics();
float density = dm.density;
cardWidth = (int) (dm.widthPixels - (2 * 18 * density));
cardHeight = (int) (dm.heightPixels - (338 * density));
swipeView = (SwipeFlingAdapterView) findViewById(R.id.swipe_view);
//swipeView.setIsNeedSwipe(true);
swipeView.setFlingListener(this);
swipeView.setOnItemClickListener(this);
adapter = new InnerAdapter();
swipeView.setAdapter(adapter);
}
示例2: onCreate
import com.lorentzos.flingswipe.SwipeFlingAdapterView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_voting);
final View heartIcon = findViewById(R.id.heart_icon);
final View brokenHeartIcon = findViewById(R.id.broken_hear_icon);
loading = findViewById(R.id.loading);
mSwipeList = (SwipeFlingAdapterView) findViewById(R.id.swipe_list);
mSwipeList.setFlingListener(new SwipeListener());
OnVoteButtonsClicked onVoteButtonsClicked = new OnVoteButtonsClicked();
heartIcon.setOnClickListener(onVoteButtonsClicked);
brokenHeartIcon.setOnClickListener(onVoteButtonsClicked);
}
示例3: initView
import com.lorentzos.flingswipe.SwipeFlingAdapterView; //导入依赖的package包/类
private void initView() {
DisplayMetrics dm = getResources().getDisplayMetrics();
float density = dm.density;
cardWidth = (int) (dm.widthPixels - (2 * 18 * density));
cardHeight = (int) (dm.heightPixels - (338 * density));
swipeView = (SwipeFlingAdapterView) findViewById(R.id.swipe_view);
if (swipeView != null) {
swipeView.setIsNeedSwipe(true);
swipeView.setFlingListener(this);
swipeView.setOnItemClickListener(this);
adapter = new InnerAdapter();
swipeView.setAdapter(adapter);
}
View v = findViewById(R.id.swipeLeft);
if (v != null) {
v.setOnClickListener(this);
}
v = findViewById(R.id.swipeRight);
if (v != null) {
v.setOnClickListener(this);
}
}
示例4: getSwipeFlingAdapterView
import com.lorentzos.flingswipe.SwipeFlingAdapterView; //导入依赖的package包/类
public SwipeFlingAdapterView getSwipeFlingAdapterView() {
return swipeFlingAdapterView;
}