本文整理汇总了Java中com.fima.cardsui.R类的典型用法代码示例。如果您正苦于以下问题:Java R类的具体用法?Java R怎么用?Java R使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
R类属于com.fima.cardsui包,在下文中一共展示了R类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initData
import com.fima.cardsui.R; //导入依赖的package包/类
private void initData(Context context) {
mContext = context;
LayoutInflater inflater = LayoutInflater.from(context);
mStacks = new ArrayList<AbstractCard>();
//inflate a different layout, depending on the number of columns
if (mColumnNumber == 1) {
inflater.inflate(R.layout.cards_view, this);
// init observable scrollview
mListView = (QuickReturnListView) findViewById(R.id.listView);
} else {
//initialize the mulitcolumn view
inflater.inflate(R.layout.cards_view_multicolumn, this);
mTableLayout = (TableLayout) findViewById(R.id.tableLayout);
}
// mListView.setCallbacks(this);
mHeader = inflater.inflate(R.layout.header, null);
mQuickReturnView = (ViewGroup) findViewById(R.id.sticky);
mPlaceholderView = mHeader.findViewById(R.id.placeholder);
}
示例2: getView
import com.fima.cardsui.R; //导入依赖的package包/类
@Override
public View getView(Context context) {
View view = LayoutInflater.from(context).inflate(getCardLayout(), null);
mCardLayout = view;
try {
if (view != null) ((FrameLayout) view.findViewById(R.id.cardContent))
.addView(getCardContent(context));
} catch (NullPointerException e) {
e.printStackTrace();
}
// ((TextView) view.findViewById(R.id.title)).setText(this.title);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
int bottom = Utils.convertDpToPixelInt(context, 12);
lp.setMargins(0, 0, 0, bottom);
if (view != null) view.setLayoutParams(lp);
return view;
}
示例3: getViewLast
import com.fima.cardsui.R; //导入依赖的package包/类
public View getViewLast(Context context) {
View view = LayoutInflater.from(context).inflate(getLastCardLayout(),
null);
mCardLayout = view;
try {
if (view != null) ((FrameLayout) view.findViewById(R.id.cardContent))
.addView(getCardContent(context));
} catch (NullPointerException e) {
e.printStackTrace();
}
// ((TextView) view.findViewById(R.id.title)).setText(this.title);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
int bottom = Utils.convertDpToPixelInt(context, 12);
lp.setMargins(0, 0, 0, bottom);
if (view != null) view.setLayoutParams(lp);
return view;
}
示例4: getViewFirst
import com.fima.cardsui.R; //导入依赖的package包/类
public View getViewFirst(Context context) {
View view = LayoutInflater.from(context).inflate(getFirstCardLayout(),
null);
mCardLayout = view;
try {
if (view != null) ((FrameLayout) view.findViewById(R.id.cardContent))
.addView(getCardContent(context));
} catch (NullPointerException e) {
e.printStackTrace();
}
// ((TextView) view.findViewById(R.id.title)).setText(this.title);
/*LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
int bottom = Utils.convertDpToPixelInt(context, 12);
lp.setMargins(0, 0, 0, bottom);
view.setLayoutParams(lp);*/
return view;
}
示例5: getView
import com.fima.cardsui.R; //导入依赖的package包/类
@Override
public View getView(Context context) {
View view = LayoutInflater.from(context).inflate(getCardLayout(), null);
mCardLayout = view;
try {
((FrameLayout) view.findViewById(R.id.cardContent))
.addView(getCardContent(context));
} catch (NullPointerException e) {
e.printStackTrace();
}
// ((TextView) view.findViewById(R.id.title)).setText(this.title);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
int bottom = Utils.convertDpToPixelInt(context, 12);
lp.setMargins(0, 0, 0, bottom);
view.setLayoutParams(lp);
return view;
}
示例6: getViewLast
import com.fima.cardsui.R; //导入依赖的package包/类
public View getViewLast(Context context) {
View view = LayoutInflater.from(context).inflate(getLastCardLayout(),
null);
mCardLayout = view;
try {
((FrameLayout) view.findViewById(R.id.cardContent))
.addView(getCardContent(context));
} catch (NullPointerException e) {
e.printStackTrace();
}
// ((TextView) view.findViewById(R.id.title)).setText(this.title);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
int bottom = Utils.convertDpToPixelInt(context, 12);
lp.setMargins(0, 0, 0, bottom);
view.setLayoutParams(lp);
return view;
}
示例7: getViewFirst
import com.fima.cardsui.R; //导入依赖的package包/类
public View getViewFirst(Context context) {
View view = LayoutInflater.from(context).inflate(getFirstCardLayout(),
null);
mCardLayout = view;
try {
((FrameLayout) view.findViewById(R.id.cardContent))
.addView(getCardContent(context));
} catch (NullPointerException e) {
e.printStackTrace();
}
// ((TextView) view.findViewById(R.id.title)).setText(this.title);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
int bottom = Utils.convertDpToPixelInt(context, 12);
lp.setMargins(0, 0, 0, bottom);
view.setLayoutParams(lp);
return view;
}
示例8: initData
import com.fima.cardsui.R; //导入依赖的package包/类
private void initData(Context context) {
mContext = context;
LayoutInflater inflater = LayoutInflater.from(context);
inflater.inflate(R.layout.cards_view, this);
mStacks = new ArrayList<AbstractCard>();
// init observable scrollview
mListView = (QuickReturnListView) findViewById(R.id.listView);
// mListView.setCallbacks(this);
mHeader = inflater.inflate(R.layout.header, null);
mQuickReturnView = (ViewGroup) findViewById(R.id.sticky);
mPlaceholderView = mHeader.findViewById(R.id.placeholder);
}
示例9: getView
import com.fima.cardsui.R; //导入依赖的package包/类
@Override
public View getView(Context context) {
View view = LayoutInflater.from(context).inflate(getCardLayout(), null);
mCardLayout = view;
try {
((FrameLayout) view.findViewById(R.id.cardContent)).addView(getCardContent(context));
} catch (NullPointerException e) {
e.printStackTrace();
}
// ((TextView) view.findViewById(R.id.title)).setText(this.title);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
int bottom = Utils.convertDpToPixelInt(context, 12);
lp.setMargins(0, 0, 0, bottom);
view.setLayoutParams(lp);
view.setTag(mBindedObject);
return view;
}
示例10: getViewLast
import com.fima.cardsui.R; //导入依赖的package包/类
public View getViewLast(Context context) {
View view = LayoutInflater.from(context).inflate(getLastCardLayout(), null);
mCardLayout = view;
try {
((FrameLayout) view.findViewById(R.id.cardContent)).addView(getCardContent(context));
} catch (NullPointerException e) {
e.printStackTrace();
}
// ((TextView) view.findViewById(R.id.title)).setText(this.title);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
int bottom = Utils.convertDpToPixelInt(context, 12);
lp.setMargins(0, 0, 0, bottom);
view.setLayoutParams(lp);
view.setTag(mBindedObject);
return view;
}
示例11: getViewFirst
import com.fima.cardsui.R; //导入依赖的package包/类
public View getViewFirst(Context context) {
View view = LayoutInflater.from(context).inflate(getFirstCardLayout(), null);
mCardLayout = view;
try {
((FrameLayout) view.findViewById(R.id.cardContent)).addView(getCardContent(context));
} catch (NullPointerException e) {
e.printStackTrace();
}
// ((TextView) view.findViewById(R.id.title)).setText(this.title);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
int bottom = Utils.convertDpToPixelInt(context, 12);
lp.setMargins(0, 0, 0, bottom);
view.setLayoutParams(lp);
view.setTag(mBindedObject);
return view;
}
示例12: getCardContent
import com.fima.cardsui.R; //导入依赖的package包/类
@Override
public View getCardContent(Context context) {
View v = LayoutInflater.from(context).inflate(R.layout.card_text_stripe, null);
SharedPreferences prefs = context.getSharedPreferences("CONFIG", 0);
String appColor = prefs.getString("APP_COLOR", "#96AA39");
if (v != null) {
((TextView) v.findViewById(R.id.title)).setText(title);
((TextView) v.findViewById(R.id.title)).setTextColor(Color
.parseColor(appColor));
((TextView) v.findViewById(R.id.description)).setText(desc);
v.findViewById(R.id.stripe).setBackgroundColor(Color.parseColor(titleColor));
}
return v != null ? v : null;
}
示例13: getCardContent
import com.fima.cardsui.R; //导入依赖的package包/类
@Override
public View getCardContent(Context context) {
View v = LayoutInflater.from(context).inflate(R.layout.card_category, null);
if (v != null) {
((TextView) v.findViewById(R.id.title)).setText(title);
((TextView) v.findViewById(R.id.description)).setText(desc);
v.findViewById(R.id.title).setBackgroundColor(Color.parseColor(titleColor));
}
return v != null ? v : null;
}
示例14: getView
import com.fima.cardsui.R; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
@Override
public View getView(Context context, boolean swipable) {
View view = LayoutInflater.from(context).inflate(getCardLayout(), null);
mCardLayout = view;
try {
if (view != null) ((FrameLayout) view.findViewById(R.id.cardContent))
.addView(getCardContent(context));
} catch (NullPointerException e) {
e.printStackTrace();
}
// ((TextView) view.findViewById(R.id.title)).setText(this.title);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
int bottom = Utils.convertDpToPixelInt(context, 12);
lp.setMargins(0, 0, 0, bottom);
if (view != null) {
view.setLayoutParams(lp);
view.setHasTransientState(true);
}
return view;
}
示例15: getViewLast
import com.fima.cardsui.R; //导入依赖的package包/类
@SuppressLint("NewApi")
public View getViewLast(Context context) {
View view = LayoutInflater.from(context).inflate(getLastCardLayout(),
null);
mCardLayout = view;
try {
if (view != null) ((FrameLayout) view.findViewById(R.id.cardContent))
.addView(getCardContent(context));
} catch (NullPointerException e) {
e.printStackTrace();
}
// ((TextView) view.findViewById(R.id.title)).setText(this.title);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
int bottom = Utils.convertDpToPixelInt(context, 12);
lp.setMargins(0, 0, 0, bottom);
if (view != null) {
view.setLayoutParams(lp);
view.setHasTransientState(true);
}
return view;
}