本文整理匯總了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;
}