本文整理了Java中android.widget.ListView.setTranslationY()
方法的一些代码示例,展示了ListView.setTranslationY()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListView.setTranslationY()
方法的具体详情如下:
包路径:android.widget.ListView
类名称:ListView
方法名:setTranslationY
暂无
代码示例来源:origin: huangfangyi/YiChat
private void completeBackToTop(){
mListView.setTranslationY(0);
int num = mListView.getAdapter().getCount() - mLastCount;
Log.v("czm","num="+num);
if(num > 0){
mListView.setSelectionFromTop(num, (int) mLastTranslationY);
}
}
public void onRefreshComplete(){
代码示例来源:origin: YiChat/android_YiChat_Lite
private void completeBackToTop(){
mListView.setTranslationY(0);
int num = mListView.getAdapter().getCount() - mLastCount;
Log.v("czm","num="+num);
if(num > 0){
mListView.setSelectionFromTop(num, (int) mLastTranslationY);
}
}
public void onRefreshComplete(){
代码示例来源:origin: huangfangyi/YiChat
@Override
public void onAnimationUpdate(ValueAnimator animation) {
float val = (float) animation.getAnimatedValue();
val = mInterpolator.getInterpolation(val / pullHeight) * val;
if (mListView != null) {
mListView.setTranslationY(val);
}
mRefreshHeader.getLayoutParams().height = (int) (val+0.5f);
mRefreshHeader.requestLayout();
Log.d("czm", "offsetY=" + mListView.getTranslationY());
}
});
代码示例来源:origin: YiChat/android_YiChat_Lite
@Override
public void onAnimationUpdate(ValueAnimator animation) {
float val = (float) animation.getAnimatedValue();
val = mInterpolator.getInterpolation(val / pullHeight) * val;
if (mListView != null) {
mListView.setTranslationY(val);
}
mRefreshHeader.getLayoutParams().height = (int) (val+0.5f);
mRefreshHeader.requestLayout();
Log.d("czm", "offsetY=" + mListView.getTranslationY());
}
});
代码示例来源:origin: huangfangyi/YiChat
@Override
public void onAnimationUpdate(ValueAnimator animation) {
float val = (float) animation.getAnimatedValue();
val = mInterpolator.getInterpolation(val / pullHeight) * val;
if (mListView != null) {
mListView.setTranslationY(val);
}
mRefreshHeader.getLayoutParams().height = (int) (val + 0.5f);
mRefreshHeader.requestLayout();
Log.d("czm", "offsetY=" + mListView.getTranslationY());
if (mListView.getTranslationY() <= mHeaderHeight) {
backToMiddleAnim.cancel();
}
}
});
代码示例来源:origin: YiChat/android_YiChat_Lite
@Override
public void onAnimationUpdate(ValueAnimator animation) {
float val = (float) animation.getAnimatedValue();
val = mInterpolator.getInterpolation(val / pullHeight) * val;
if (mListView != null) {
mListView.setTranslationY(val);
}
mRefreshHeader.getLayoutParams().height = (int) (val + 0.5f);
mRefreshHeader.requestLayout();
Log.d("czm", "offsetY=" + mListView.getTranslationY());
if (mListView.getTranslationY() <= mHeaderHeight) {
backToMiddleAnim.cancel();
}
}
});
代码示例来源:origin: geniusgithub/AndroidDialer
mSubjectList.setTranslationY(mSubjectList.getHeight());
} else {
mSubjectList.setTranslationY(0);
代码示例来源:origin: huangfangyi/YiChat
Log.d("czm", "dy/mHeight=" + (dy / mHeight));
float offsetY = mInterpolator.getInterpolation(dy / mHeight) * dy/3;
mListView.setTranslationY(offsetY);
mRefreshHeader.getLayoutParams().height = (int) (offsetY+0.5f);
mRefreshHeader.requestLayout();
代码示例来源:origin: YiChat/android_YiChat_Lite
Log.d("czm", "dy/mHeight=" + (dy / mHeight));
float offsetY = mInterpolator.getInterpolation(dy / mHeight) * dy/3;
mListView.setTranslationY(offsetY);
mRefreshHeader.getLayoutParams().height = (int) (offsetY+0.5f);
mRefreshHeader.requestLayout();
内容来源于网络,如有侵权,请联系作者删除!