當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。