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


Java CardListView.setAdapter方法代码示例

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


在下文中一共展示了CardListView.setAdapter方法的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: 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

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例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<200;i++){
            GooglePlaySmallCard card = new GooglePlaySmallCard(this.getActivity());
            card.setTitle("Application example "+i);
            card.setSecondaryTitle("A company inc..."+i);
            card.setRating((float)(Math.random()*(5.0)));
            card.count=i;

            //Only for test, change some icons
            if ((i>10 && i<15) || (i>35 && i<45)){
                card.setResourceIdThumbnail(R.drawable.ic_launcher);
            }


            card.init();

            cards.add(card);
        }

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

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

示例13: onCreate

import it.gmariotti.cardslib.library.view.CardListView; //导入方法依赖的package包/类
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_edit_macros);

        initToolbar();
        initDrawer();

        mListView = (CardListView) findViewById(R.id.listview);
        mListEmptyTextView = (TextView) findViewById(R.id.listEmptyText);
        mMacroList = MacroUtils.loadMacroList(mPrefs);

//        if (mMacroList.size() >= MACRO_SIZE_WARN) {
//            macroListLengthWarningDialog(mMacroList.size());
//        }

        mCards = new ArrayList<Card>();
        for (MacroEntry macroEntry : mMacroList) {
            mCards.add(macroEntryToCard(macroEntry));
        }

        mCardArrayAdapter = new CardArrayAdapter(this, mCards);
        if (mListView != null) {
            mListView.setAdapter(mCardArrayAdapter);
        }

        Drawable plus = new IconicsDrawable(this, FontAwesome.Icon.faw_plus).color(Color.DKGRAY).sizeDp(20);
        FloatingActionButton addButton = (FloatingActionButton) findViewById(R.id.add);
        addButton.setImageDrawable(plus);
        addButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                addMacro();
            }
        });
    }
 
开发者ID:mitchtech,项目名称:XposedMacroExpand,代码行数:37,代码来源:EditMacrosActivity.java

示例14: setupCards

import it.gmariotti.cardslib.library.view.CardListView; //导入方法依赖的package包/类
private void setupCards() {
    for (GameDescription curGame : mTraining) {
        mCards.add(new GameCard(this, curGame));
    }
    mCardArrayAdapter = new CardArrayAdapter(this, mCards);
    mCardListView = (CardListView) findViewById(R.id.game_list);
    mCardListView.setAdapter(mCardArrayAdapter);
    View footerItem = getLayoutInflater()
            .inflate(R.layout.list_item_training_footer, mCardListView, false);
    mCardListView.addFooterView(footerItem);
    mCardArrayAdapter.notifyDataSetChanged();
}
 
开发者ID:Tetr4,项目名称:Spacecurl,代码行数:13,代码来源:TrainingBuilderActivity.java

示例15: onCreateView

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

    Computer c0 = new Computer();
    Computer c1 = new Computer("MacBook Pro", "Marcus Gabilheri", false, "Out of disk space");
    Computer c2 = new Computer("Dell Dimension", "Old Person", true, "Too old");
    Computer c3 = new Computer("MacBook", "Hali Deubler", false, "Windows installed");
    Computer c4 = new Computer("MacBook Pro", "Ryan Dawkins", false, "Arch exploded");
    Computer c5 = new Computer("Lenovo Y500", "Aaron Weaver", false, "No retinas");

    ArrayList<Computer> computers = new ArrayList<Computer>(10);
    computers.add(c0);
    computers.add(c1);
    computers.add(c2);
    computers.add(c3);
    computers.add(c4);
    computers.add(c5);

    mCcomputerList = (CardListView) view.findViewById(R.id.computers_list);
    mCardsList = new ArrayList<Card>();
    for(int i = 0; i < computers.size(); i++) {
        // get current computer in list
        Computer temp = computers.get(i);

        //create card to display the computer
        Card card = new Card(getActivity());

        //create and add the header for the card from the owner name
        CardHeader header = new CardHeader(getActivity());
        card.addCardHeader(header);
        header.setTitle(temp.getOwnerName());

        //set the content of the card to the model name and problem with the computer
        card.setTitle("Model:" + "\n    " + temp.getModelName() + "\n\nProblem:" + "\n    " + temp.getProblem());
        card.setShadow(true);

        // select drawable based on whether or not the computer is a desktop
        CardThumbnail thumb = new CardThumbnail(getActivity());
        if (temp.isDesktop()) {
            thumb.setDrawableResource(R.drawable.ic_desktop);
        } else {
            thumb.setDrawableResource(R.drawable.ic_laptop);
        }
        card.addCardThumbnail(thumb);
        mCardsList.add(card);
    }

    mCardAdapter = new CardArrayAdapter(getActivity(), mCardsList);
    mCardAdapter.setEnableUndo(true);
    mCcomputerList.setAdapter(mCardAdapter);

    return view;
}
 
开发者ID:kylealanr,项目名称:IT_POS_Check_In,代码行数:55,代码来源:ToDo.java


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