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


Java CardListView类代码示例

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


CardListView类属于it.gmariotti.cardslib.library.view包,在下文中一共展示了CardListView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initCards

import it.gmariotti.cardslib.library.view.CardListView; //导入依赖的package包/类
private void initCards() {

		// Init an array of Cards
		ArrayList<Card> cardsChart = new ArrayList<Card>();
		Card card = init_chart_card();
		cardsChart.add(card);
		JsonObjResult tmp;
		for (int i = 0; i < Application.listaPostow.size(); i++) {
			tmp = Application.listaPostow.get(i);
			card = init_info_card(tmp.getBrief(), tmp.getStatus(), i, tmp.getDue_date());
			cardsChart.add(card);
		}
		CardArrayAdapter mCardArrayAdapterGrades = new CardArrayAdapter(getActivity(), cardsChart);

		CardListView listView = (CardListView) getActivity().findViewById(R.id.card_list);
		if (listView != null) {
			listView.setAdapter(mCardArrayAdapterGrades);
		}
	}
 
开发者ID:tajchert,项目名称:CEEHack,代码行数:20,代码来源:CardsPartyFragment.java

示例2: initCards

import it.gmariotti.cardslib.library.view.CardListView; //导入依赖的package包/类
private void initCards() {

		// Init an array of Cards
		ArrayList<Card> cardsChart = new ArrayList<Card>();
		Card card = init_info_card(tmp.getFull(), tmp.getStatus(), tmp.getDue_date());
		cardsChart.add(card);
		card = init_fulfilled_card();
		cardsChart.add(card);
		card = init_proof_card();
		cardsChart.add(card);
		card = init_chart_detail_card();
		cardsChart.add(card);
		
		/*for (int i = 0; i < 5; i++) {
			card = init_chart_card();
			cardsChart.add(card);
		}*/
		CardArrayAdapter mCardArrayAdapterGrades = new CardArrayAdapter(getActivity(), cardsChart);

		CardListView listView = (CardListView) getActivity().findViewById(R.id.card_list);
		if (listView != null) {
			listView.setAdapter(mCardArrayAdapterGrades);
		}
	}
 
开发者ID:tajchert,项目名称:CEEHack,代码行数:25,代码来源:CardsDetailFragment.java

示例3: initCards

import it.gmariotti.cardslib.library.view.CardListView; //导入依赖的package包/类
private void initCards() {

        //Init an array of Cards
        ArrayList<Card> cards = new ArrayList<Card>();
        for (int i=0;i<200;i++){
            Card card = init_standard_header_with_expandcollapse_button_custom_area("Header "+i,i);
            cards.add(card);
        }

        CardArrayAdapter mCardArrayAdapter = new CardArrayAdapter(getActivity(),cards);

        CardListView listView = (CardListView) getActivity().findViewById(R.id.carddemo_list_expand);
        if (listView!=null){
            listView.setAdapter(mCardArrayAdapter);
        }
    }
 
开发者ID:tajchert,项目名称:CEEHack,代码行数:17,代码来源:ListExpandCardFragment.java

示例4: initCard

import it.gmariotti.cardslib.library.view.CardListView; //导入依赖的package包/类
/**
 * This method builds a simple card
 */
private void initCard() {

    //Init an array of Cards
    ArrayList<Card> cards = new ArrayList<Card>();
    for (int i = 0; i < 200; i++) {
        PicassoCard card = new PicassoCard(this.getActivity());
        card.setTitle("A simple card loaded with Picasso " + i);
        card.setSecondaryTitle("Simple text..." + i);
        card.setCount(i);
        cards.add(card);
    }

    CardArrayAdapter mCardArrayAdapter = new CardArrayAdapter(getActivity(), cards);

    CardListView listView = (CardListView) getActivity().findViewById(R.id.carddemo_extra_list_picasso);
    if (listView != null) {
        listView.setAdapter(mCardArrayAdapter);
    }

}
 
开发者ID:tajchert,项目名称:CEEHack,代码行数:24,代码来源:PicassoFragment.java

示例5: initCard

import it.gmariotti.cardslib.library.view.CardListView; //导入依赖的package包/类
/**
 * This method builds a simple card
 */
private void initCard() {

    //Init an array of Cards
    ArrayList<Card> cards = new ArrayList<Card>();
    for (int i = 0; i < 200; i++) {
        IonCard card = new IonCard(this.getActivity());
        card.setTitle("A simple card loaded with Ion " + i);
        card.setSecondaryTitle("Simple text..." + i);
        card.setCount(i);
        cards.add(card);
    }

    CardArrayAdapter mCardArrayAdapter = new CardArrayAdapter(getActivity(), cards);

    CardListView listView = (CardListView) getActivity().findViewById(R.id.carddemo_extra_list_picasso);
    if (listView != null) {
        listView.setAdapter(mCardArrayAdapter);
    }

}
 
开发者ID:tajchert,项目名称:CEEHack,代码行数:24,代码来源:IonFragment.java

示例6: initCard

import it.gmariotti.cardslib.library.view.CardListView; //导入依赖的package包/类
/**
 * This method builds a simple card
 */
private void initCard() {

    //Init an array of Cards
    ArrayList<Card> cards = new ArrayList<Card>();
    for (int i = 0; i < 200; i++) {
        UniversalImageLoaderCard card = new UniversalImageLoaderCard(this.getActivity(),options);
        card.setTitle("A simple card loaded with Universal-Image-Loader " + i);
        card.setSecondaryTitle("Simple text..." + i);
        card.setCount(i);
        cards.add(card);
    }

    CardArrayAdapter mCardArrayAdapter = new CardArrayAdapter(getActivity(), cards);

    CardListView listView = (CardListView) getActivity().findViewById(R.id.carddemo_extra_list_picasso);
    if (listView != null) {
        listView.setAdapter(mCardArrayAdapter);
    }

}
 
开发者ID:tajchert,项目名称:CEEHack,代码行数:24,代码来源:UniversalImageLoaderFragment.java

示例7: onActivityCreated

import it.gmariotti.cardslib.library.view.CardListView; //导入依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    listView = (CardListView) getActivity().findViewById(R.id.carddemo_extra_list_actionbarpulltorefresh);

    initCard();

    // Retrieve the PullToRefreshLayout from the content view
    mPullToRefreshLayout = (PullToRefreshLayout) getActivity().findViewById(R.id.carddemo_extra_ptr_layout);

    // Now setup the PullToRefreshLayout
    ActionBarPullToRefresh.from(this.getActivity())
            // Mark All Children as pullable
            .allChildrenArePullable()
            // Set the OnRefreshListener
            .listener(this)
            // Finally commit the setup to our PullToRefreshLayout
            .setup(mPullToRefreshLayout);

}
 
开发者ID:tajchert,项目名称:CEEHack,代码行数:22,代码来源:ActionbarpullFragment.java

示例8: onCreateView

import it.gmariotti.cardslib.library.view.CardListView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    this.container = container;

    View rootView = inflater.inflate(R.layout.fragment_reported_taxis, container, false);

    ArrayList<Card> cards = new ArrayList<Card>();
    cards.addAll(loadReportedTaxis());

    CardArrayAdapter mCardArrayAdapter = new CardArrayAdapter(rootView.getContext(), cards);
    CardListView listView = (CardListView) rootView.findViewById(R.id.reported_list);
    if (listView != null) {
        listView.setAdapter(mCardArrayAdapter);
    }

    dismissAnimation = (SwipeDismissAnimation) new SwipeDismissAnimation(getActivity()).setup(mCardArrayAdapter);

    FloatingActionButton floatingActionButton = (FloatingActionButton) rootView.findViewById(R.id.reportFab);
    floatingActionButton.attachToListView(listView);
    // floatingActionButton.setOnClickListener();

    return rootView;
}
 
开发者ID:mSobhy90,项目名称:TaxiFareCalculator,代码行数:24,代码来源:ReportedTaxisFragment.java

示例9: onCreateView

import it.gmariotti.cardslib.library.view.CardListView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_purchase, container, false);

    cardListView = (CardListView) view.findViewById(R.id.cardviewlist);

    return view;
}
 
开发者ID:thomashaertel,项目名称:android-billing,代码行数:9,代码来源:PurchaseFragment.java

示例10: onActivityCreated

import it.gmariotti.cardslib.library.view.CardListView; //导入依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    mListView = (CardListView) getActivity().findViewById(R.id.carddemo_list_gplaycard);
    initCards();

    if (savedInstanceState!=null){
        mCardArrayAdapter.getUndoBarController().onRestoreInstanceState(savedInstanceState);
    }

    getView().setBackgroundColor(Color.parseColor("#E0E4CC"));
}
 
开发者ID:parthsatra,项目名称:WalkPotato,代码行数:14,代码来源:RewardsFragment.java

示例11: onActivityCreated

import it.gmariotti.cardslib.library.view.CardListView; //导入依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    mListView = (CardListView) getActivity().findViewById(R.id.carddemo_list_gplaycard);
    initCards();
}
 
开发者ID:tajchert,项目名称:CEEHack,代码行数:8,代码来源:ListGplayUndoCardFragment2.java

示例12: initCards

import it.gmariotti.cardslib.library.view.CardListView; //导入依赖的package包/类
private void initCards() {

        //Init an array of Cards
        ArrayList<Card> cards = new ArrayList<Card>();
        for (int i = 0; i < 5; i++) {
            ColorCard card = new ColorCard(this.getActivity());
            card.setTitle("A simple colored card " + i);
            card.setCount(i);
            switch (i) {
                case 0:
                    card.setBackgroundResourceId(R.drawable.demo_card_selector_color5);
                    break;
                case 1:
                    card.setBackgroundResourceId(R.drawable.demo_card_selector_color4);
                    break;
                case 2:
                    card.setBackgroundResourceId(R.drawable.demo_card_selector_color3);
                    break;
                case 3:
                    card.setBackgroundResourceId(R.drawable.demo_card_selector_color2);
                    break;
                case 4:
                    card.setBackgroundResourceId(R.drawable.demo_card_selector_color1);
                    break;
            }

            cards.add(card);
        }

        CardArrayAdapter mCardArrayAdapter = new CardArrayAdapter(getActivity(), cards);

        CardListView listView = (CardListView) getActivity().findViewById(R.id.carddemo_list_colors);
        if (listView != null) {
            listView.setAdapter(mCardArrayAdapter);
        }
    }
 
开发者ID:tajchert,项目名称:CEEHack,代码行数:37,代码来源:ListColorFragment.java

示例13: init

import it.gmariotti.cardslib.library.view.CardListView; //导入依赖的package包/类
private void init() {

        mAdapter = new MyCursorCardAdapter(getActivity());

        mListView = (CardListView) getActivity().findViewById(R.id.carddemo_list_cursor);
        if (mListView != null) {
            mListView.setAdapter(mAdapter);
        }

        // Force start background query to load sessions
        getLoaderManager().restartLoader(0, null, this);
    }
 
开发者ID:tajchert,项目名称:CEEHack,代码行数:13,代码来源:ListCursorCardFragment.java

示例14: initCards

import it.gmariotti.cardslib.library.view.CardListView; //导入依赖的package包/类
private void initCards() {

        ArrayList<Card> cards = new ArrayList<Card>();
        for (int i=0;i<50;i++){

            CardExample card = new CardExample(getActivity(),"My title "+i,"Inner text "+i);
            cards.add(card);

            CardExample2 cardx = new CardExample2(this.getActivity());
            cardx.title="Application example "+i;
            cardx.secondaryTitle="A company inc..."+i;
            cardx.rating=(float)(Math.random()*(5.0));
            cardx.count=i;
            cards.add(cardx);

            MayKnowCard card2= new MayKnowCard(getActivity());
            card2.setType(2); //Very important with different inner layout
            card2.setSwipeable(true);
            cards.add(card2);

        }

        // Provide a custom adapter.
        // It is important to set the viewTypeCount
        // You have to provide in your card the type value with {@link Card#setType(int)} method.
        CardArrayAdapter mCardArrayAdapter = new CardArrayAdapter(getActivity(),cards);
        mCardArrayAdapter.setInnerViewTypeCount(3);

        // An alternative is to write a own CardArrayAdapter
        // MyCardArrayAdapter mCardArrayAdapter = new MyCardArrayAdapter(getActivity(),cards);


        CardListView listView = (CardListView) getActivity().findViewById(R.id.carddemo_list_base1);
        if (listView!=null){
            listView.setAdapter(mCardArrayAdapter);
        }
    }
 
开发者ID:tajchert,项目名称:CEEHack,代码行数:38,代码来源:ListDifferentInnerBaseFragment.java

示例15: initCards

import it.gmariotti.cardslib.library.view.CardListView; //导入依赖的package包/类
private void initCards() {

        ArrayList<Card> cards = new ArrayList<Card>();
        for (int i=0;i<200;i++){
            CardExample card = new CardExample(getActivity(),"My title "+i,"Inner text "+i);
            cards.add(card);
        }

        CardArrayAdapter mCardArrayAdapter = new CardArrayAdapter(getActivity(),cards);

        CardListView listView = (CardListView) getActivity().findViewById(R.id.carddemo_list_base1);
        if (listView!=null){
            listView.setAdapter(mCardArrayAdapter);
        }
    }
 
开发者ID:tajchert,项目名称:CEEHack,代码行数:16,代码来源:ListBaseFragment.java


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