• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java R类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.fima.cardsui.R的典型用法代码示例。如果您正苦于以下问题:Java R类的具体用法?Java R怎么用?Java R使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



R类属于com.fima.cardsui包,在下文中一共展示了R类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);

}
 
开发者ID:hsbadr,项目名称:MultiSystem,代码行数:22,代码来源:CardUI.java


示例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;
}
 
开发者ID:jamison904,项目名称:APKreator,代码行数:27,代码来源:Card.java


示例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;
    }
 
开发者ID:jamison904,项目名称:APKreator,代码行数:27,代码来源:Card.java


示例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;
    }
 
开发者ID:jamison904,项目名称:APKreator,代码行数:27,代码来源:Card.java


示例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;
}
 
开发者ID:cast-framework,项目名称:cards-against-robots,代码行数:27,代码来源:Card.java


示例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;
    }
 
开发者ID:cast-framework,项目名称:cards-against-robots,代码行数:27,代码来源:Card.java


示例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;
    }
 
开发者ID:cast-framework,项目名称:cards-against-robots,代码行数:27,代码来源:Card.java


示例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);

}
 
开发者ID:PaperAirplane-Dev-Team,项目名称:CardsUILib,代码行数:17,代码来源:CardUI.java


示例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;
}
 
开发者ID:PaperAirplane-Dev-Team,项目名称:CardsUILib,代码行数:25,代码来源:Card.java


示例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;
	}
 
开发者ID:PaperAirplane-Dev-Team,项目名称:CardsUILib,代码行数:24,代码来源:Card.java


示例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;
	}
 
开发者ID:PaperAirplane-Dev-Team,项目名称:CardsUILib,代码行数:24,代码来源:Card.java


示例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;
}
 
开发者ID:hsbadr,项目名称:MultiSystem,代码行数:15,代码来源:CardTextStripe.java


示例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;
}
 
开发者ID:hsbadr,项目名称:MultiSystem,代码行数:11,代码来源:CardCategory.java


示例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;
}
 
开发者ID:hsbadr,项目名称:MultiSystem,代码行数:31,代码来源:Card.java


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


示例16: getViewFirst

import com.fima.cardsui.R; //导入依赖的package包/类
@SuppressLint("NewApi")
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);

    if (view != null) {
        view.setLayoutParams(lp);
        view.setHasTransientState(true);
    }

    return view;
}
 
开发者ID:hsbadr,项目名称:MultiSystem,代码行数:31,代码来源:Card.java


示例17: convert

import com.fima.cardsui.R; //导入依赖的package包/类
/**
 * Attempt to modify the convertView instead of inflating a new View for this CardStack.
 * If convertView isn't compatible, it isn't modified.
 *
 * @param convertView view to try reusing
 * @return true on success, false if the convertView is not compatible
 */
private boolean convert(View convertView) {
    // only convert singleton stacks
    if (cards.size() != 1) {
        Log.d("CardsUI", "Can't convert view: amount of cards is " + cards.size());
        return false;
    }

    RelativeLayout container = (RelativeLayout) convertView.findViewById(R.id.stackContainer);
    if (container == null) {
        Log.d("CardsUI", "Can't convert view: can't find stackContainer");
        return false;
    }

    if (container.getChildCount() != 1) {
        Log.d("CardsUI", "Can't convert view: child count is " + container.getChildCount());
        return false;
    }

    // check to see if they're compatible Card types
    Card card = cards.get(0);
    View convertCardView = container.getChildAt(0);

    if (convertCardView == null || convertCardView.getId() != card.getId()) {
        Log.d("CardsUI", String.format("Can't convert view: child Id is 0x%x, card Id is 0x%x", convertCardView.getId(), card.getId()));
        return false;
    }

    if (card.convert(convertCardView))
        return true;

    return false;
}
 
开发者ID:hsbadr,项目名称:MultiSystem,代码行数:40,代码来源:CardStack.java


示例18: 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);
    if (v != null) {
        ((TextView) v.findViewById(R.id.title)).setText(title);
        ((TextView) v.findViewById(R.id.title)).setTextColor(Color
                .parseColor(titleColor));
        ((TextView) v.findViewById(R.id.description)).setText(desc);
        v.findViewById(R.id.stripe).setBackgroundColor(Color.parseColor(stripeColor));
    }
    return v != null ? v : null;
}
 
开发者ID:Androguide,项目名称:Pimp_my_Z1,代码行数:13,代码来源:CardTextStripe.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Words类代码示例发布时间:2022-05-22
下一篇:
Java Http类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap