本文整理汇总了Java中com.andtinder.model.Orientations.Orientation类的典型用法代码示例。如果您正苦于以下问题:Java Orientation类的具体用法?Java Orientation怎么用?Java Orientation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Orientation类属于com.andtinder.model.Orientations包,在下文中一共展示了Orientation类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ensureFull
import com.andtinder.model.Orientations.Orientation; //导入依赖的package包/类
private void ensureFull() {
while (mNextAdapterPosition < mListAdapter.getCount() && getChildCount() < mMaxVisible) {
View view = mListAdapter.getView(mNextAdapterPosition, null, this);
view.setLayerType(LAYER_TYPE_SOFTWARE, null);
if (mOrientation == Orientation.Disordered) {
if (getChildCount() != 0) {
view.setRotation(getDisorderedRotation());
} else {
addUrlListener(view);
}
}
addViewInLayout(view, 0, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT,
mListAdapter.getItemViewType(mNextAdapterPosition)), false);
requestLayout();
mNextAdapterPosition += 1;
}
}
示例2: retrieveLastCard
import com.andtinder.model.Orientations.Orientation; //导入依赖的package包/类
/**
* Gets the previously destroyed card and returns it to top of stack
*
* @return false if there are no previously destroyed cards
*/
public boolean retrieveLastCard() {
if (mListAdapter.getCount() > 0
&& mAdapterStartIndex > 0) {
mAdapterStartIndex -= 1;
View view = mListAdapter.getView(mAdapterStartIndex, null, this);
view.setLayerType(LAYER_TYPE_SOFTWARE, null);
if (mOrientation == Orientation.Disordered) {
addUrlListener(view);
}
int topIndexInLayout = mNextAdapterPosition - mAdapterStartIndex - 1;
addViewInLayout(view, topIndexInLayout, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT,
mListAdapter.getItemViewType(mNextAdapterPosition)), false);
requestLayout();
refreshTopCard();
return true;
}
return false;
}
示例3: CardContainer
import com.andtinder.model.Orientations.Orientation; //导入依赖的package包/类
public CardContainer(Context context) {
super(context);
setOrientation(Orientation.Disordered);
setGravity(Gravity.CENTER);
init();
}
示例4: initFromXml
import com.andtinder.model.Orientations.Orientation; //导入依赖的package包/类
private void initFromXml(AttributeSet attr) {
TypedArray a = getContext().obtainStyledAttributes(attr,
R.styleable.CardContainer);
setGravity(a.getInteger(R.styleable.CardContainer_android_gravity, Gravity.CENTER));
int orientation = a.getInteger(R.styleable.CardContainer_orientation, 1);
setOrientation(Orientation.fromIndex(orientation));
a.recycle();
}
示例5: CardContainer
import com.andtinder.model.Orientations.Orientation; //导入依赖的package包/类
public CardContainer(Context context) {
super(context);
setOrientation(Orientation.Disordered);
setGravity(Gravity.CENTER);
init();
}
示例6: ensureFull
import com.andtinder.model.Orientations.Orientation; //导入依赖的package包/类
private void ensureFull() {
while (mNextAdapterPosition < mListAdapter.getCount() && getChildCount() < mMaxVisible) {
View view = mListAdapter.getView(mNextAdapterPosition, null, this);
view.setLayerType(LAYER_TYPE_SOFTWARE, null);
if(mOrientation == Orientation.Disordered) {
view.setRotation(getDisorderedRotation());
}
addViewInLayout(view, 0, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT,
mListAdapter.getItemViewType(mNextAdapterPosition)), false);
requestLayout();
mNextAdapterPosition += 1;
}
}
示例7: getOrientation
import com.andtinder.model.Orientations.Orientation; //导入依赖的package包/类
public Orientation getOrientation() {
return mOrientation;
}