当前位置: 首页>>代码示例>>Java>>正文


Java Orientation类代码示例

本文整理汇总了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;
    }
}
 
开发者ID:KonradJanica,项目名称:aMatch,代码行数:20,代码来源:CardContainer.java

示例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;
}
 
开发者ID:KonradJanica,项目名称:aMatch,代码行数:30,代码来源:CardContainer.java

示例3: CardContainer

import com.andtinder.model.Orientations.Orientation; //导入依赖的package包/类
public CardContainer(Context context) {
    super(context);

    setOrientation(Orientation.Disordered);
    setGravity(Gravity.CENTER);
    init();
}
 
开发者ID:KonradJanica,项目名称:aMatch,代码行数:8,代码来源:CardContainer.java

示例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();
}
 
开发者ID:KonradJanica,项目名称:aMatch,代码行数:11,代码来源:CardContainer.java

示例5: CardContainer

import com.andtinder.model.Orientations.Orientation; //导入依赖的package包/类
public CardContainer(Context context) {
    super(context);

    setOrientation(Orientation.Disordered);
    setGravity(Gravity.CENTER);
    init();

}
 
开发者ID:Vn0m,项目名称:Sociadee,代码行数:9,代码来源:CardContainer.java

示例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;
    }
}
 
开发者ID:Vn0m,项目名称:Sociadee,代码行数:16,代码来源:CardContainer.java

示例7: getOrientation

import com.andtinder.model.Orientations.Orientation; //导入依赖的package包/类
public Orientation getOrientation() {
    return mOrientation;
}
 
开发者ID:KonradJanica,项目名称:aMatch,代码行数:4,代码来源:CardContainer.java


注:本文中的com.andtinder.model.Orientations.Orientation类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。