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

Java CardGridView类代码示例

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

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



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

示例1: initCards

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

        ArrayList<Card> cards = new ArrayList<Card>();
        for (int i=0;i<200;i++){
            GdriveGridCard card = new GdriveGridCard(getActivity());

            card.headerTitle="Folder "+i;
            card.init();
            cards.add(card);
        }

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

        CardGridView gridView = (CardGridView) getActivity().findViewById(R.id.carddemo_grid_base);
        if (gridView!=null){
            gridView.setAdapter(mCardArrayAdapter);
        }
    }
 
开发者ID:tajchert,项目名称:CEEHack,代码行数:19,代码来源:GridBaseFragment.java


示例2: onCreate

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

    //Set the layout
    setContentView(R.layout.activity_main);

    //Define the toolbar
    toolbar = (Toolbar) findViewById(R.id.toolbar);

    //Set supportActionBar and title
    setSupportActionBar(toolbar);
    getSupportActionBar().setTitle("Local Vicinity");

    //If network connection exists then download new files
    if (isNetworkAvailable() == true) {
        startDownloads();
    } else//If no connection display error message to the user
    {
        Toast.makeText(getApplicationContext(), "No network connection available, results may be incorrect",
                Toast.LENGTH_LONG).show();
    }

    //Create the 8 different category cards
    createMainCards();

    //Create the card for adding a location
    createAddCard();
    createViewCard();

    //Set the card grid array adapter
    CardGridArrayAdapter mCardArrayAdapter = new CardGridArrayAdapter(this, cards);

    //Bind the gridview to the adapter
    CardGridView gridView = (CardGridView) this.findViewById(R.id.myGrid);
    if (gridView != null) {
        gridView.setAdapter(mCardArrayAdapter);
    }
}
 
开发者ID:tflynn93,项目名称:LocalVicinity,代码行数:40,代码来源:MainActivity.java


示例3: onCreate

import it.gmariotti.cardslib.library.view.CardGridView; //导入依赖的package包/类
/**
 * Called when the activity is created. Setup the data
 */
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.tasker);

    // Show the Up button in the action bar.
    setupActionBar();
    ArrayList<Card> cards = new ArrayList<Card>();

    for (TaskerCommand command : TaskerCommands.getTaskerCommands(this)) {
        cards.add(new TaskerCard(this, command));
    }
    if (cards.size() == 0) {

        Card card = new Card(this, R.layout.no_tasker_commands_inner);
        CardHeader header = new CardHeader(this);
        header.setTitle("No Tasker Commands");
        card.addCardHeader(header);
        cards.add(card);
    }
    CardGridArrayAdapter mCardArrayAdapter = new CardGridArrayAdapter(this, cards);
    final CardGridView listView = (CardGridView) findViewById(R.id.card_list_view);

    animCardArrayAdapter = new SwingBottomInAnimationAdapter(mCardArrayAdapter);
    animCardArrayAdapter.setAbsListView(listView);
    listView.setExternalAdapter(animCardArrayAdapter, mCardArrayAdapter);
}
 
开发者ID:RSenApps,项目名称:Commandr-Android,代码行数:31,代码来源:TaskerActivity.java


示例4: onCreate

import it.gmariotti.cardslib.library.view.CardGridView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.most_wanted);
    setupActionBar();
    AdView adView = (AdView) this.findViewById(R.id.adView);
    if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean("ads", true)) {
        adView.setVisibility(View.VISIBLE);
        Bundle bundle = new Bundle();
        bundle.putString("color_bg", "4285f4");
        bundle.putString("color_bg_top", "4285f4");
        bundle.putString("color_border", "4285f4");
        bundle.putString("color_link", "EEEEEE");
        bundle.putString("color_text", "FFFFFF");
        bundle.putString("color_url", "EEEEEE");
        AdMobExtras extras = new AdMobExtras(bundle);
        AdRequest adRequest = new AdRequest.Builder().addTestDevice("E9439BFF2245E1BC1DD0FDB28EA467F9").addTestDevice("49924C4BF3738C69A7497A524D092901").addNetworkExtras(extras).build();
        adView.loadAd(adRequest);
    } else {
        adView.setVisibility(View.GONE);
    }

    ArrayList<Card> cards = new ArrayList<Card>();
    for (MostWantedCommand command : MostWantedCommands.getCommands(this)) {
        cards.add(new MostWantedCard(this, command));
    }
    CardGridArrayAdapter mCardArrayAdapter = new CardGridArrayAdapter(this, cards);
    final CardGridView listView = (CardGridView) findViewById(R.id.card_list_view);
    ((FloatingActionButton)findViewById(R.id.vote)).attachToListView(listView);
    SwingBottomInAnimationAdapter animCardArrayAdapter = new SwingBottomInAnimationAdapter(mCardArrayAdapter);
    animCardArrayAdapter.setAbsListView(listView);
    listView.setExternalAdapter(animCardArrayAdapter, mCardArrayAdapter);
    findViewById(R.id.vote).setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            startActivity(new Intent(MostWantedCommandsActivity.this, VotingActivity.class));
        }
    });
}
 
开发者ID:RSenApps,项目名称:Commandr-Android,代码行数:40,代码来源:MostWantedCommandsActivity.java


示例5: updateGrid

import it.gmariotti.cardslib.library.view.CardGridView; //导入依赖的package包/类
public void updateGrid() {
    // the adapter will get the latest cards state
    mCardArrayAdapter = new CardGridArrayAdapter(getActivity(), cards);

    listView = (CardGridView) getActivity().findViewById(R.id.carddemo_grid_base1);
    if (listView != null) {
        listView.setAdapter(mCardArrayAdapter);
    }
}
 
开发者ID:madjidtaha,项目名称:handy,代码行数:10,代码来源:GridGplayFragment.java


示例6: initCards

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

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

            GplayGridCard card = new GplayGridCard(getActivity());

            card.headerTitle = "App example " + i;
            card.secondaryTitle = "Some text here " + i;
            card.rating = (float) (Math.random() * (5.0));

            //Only for test, change some icons
            if ((i % 6 == 0)) {
                card.resourceIdThumbnail = R.drawable.ic_ic_dh_bat;
            } else if ((i % 6 == 1)) {
                card.resourceIdThumbnail = R.drawable.ic_ic_dh_net;
            } else if ((i % 6 == 2)) {
                card.resourceIdThumbnail = R.drawable.ic_tris;
            } else if ((i % 6 == 3)) {
                card.resourceIdThumbnail = R.drawable.ic_info;
            } else if ((i % 6 == 4)) {
                card.resourceIdThumbnail = R.drawable.ic_smile;
            }

            card.init();
            cards.add(card);
        }

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

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


示例7: init

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

        mAdapter = new MyCursorCardAdapter(getActivity());

        mGridView = (CardGridView) getActivity().findViewById(R.id.carddemo_grid_cursor);
        if (mGridView != null) {
            mGridView.setAdapter(mAdapter);
        }

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


示例8: initCard

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

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

        GplayGridCard card = new GplayGridCard(getActivity());

        card.headerTitle = "App example " + i;
        card.secondaryTitle = "Some text here " + i;
        card.rating = (float) (Math.random() * (5.0));

        //Only for test, change some icons
        if ((i % 6 == 0)) {
            card.resourceIdThumbnail = R.drawable.ic_ic_dh_bat;
        } else if ((i % 6 == 1)) {
            card.resourceIdThumbnail = R.drawable.ic_ic_dh_net;
        } else if ((i % 6 == 2)) {
            card.resourceIdThumbnail = R.drawable.ic_tris;
        } else if ((i % 6 == 3)) {
            card.resourceIdThumbnail = R.drawable.ic_info;
        } else if ((i % 6 == 4)) {
            card.resourceIdThumbnail = R.drawable.ic_smile;
        }

        card.init();
        cards.add(card);
    }

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

    mListView = (CardGridView) getActivity().findViewById(R.id.carddemo_extras_grid_base1);
    if (mListView != null) {
        setAlphaAdapter();
    }
}
 
开发者ID:tajchert,项目名称:CEEHack,代码行数:39,代码来源:ListViewGridAnimationsFragment.java


示例9: getCardGridView

import it.gmariotti.cardslib.library.view.CardGridView; //导入依赖的package包/类
/**
 * @return {@link CardGridView}
 */
public CardGridView getCardGridView() {
    return mCardGridView;
}
 
开发者ID:Daniele-Comi,项目名称:System-Monitor,代码行数:7,代码来源:CardGridArrayAdapter.java


示例10: setCardGridView

import it.gmariotti.cardslib.library.view.CardGridView; //导入依赖的package包/类
@Override
public void setCardGridView(CardGridView cardGridView) {
    super.setCardGridView(cardGridView);
    mHelper.setAdapterView(cardGridView);
}
 
开发者ID:Daniele-Comi,项目名称:System-Monitor,代码行数:6,代码来源:CardGridArrayMultiChoiceAdapter.java


示例11: getCardGridView

import it.gmariotti.cardslib.library.view.CardGridView; //导入依赖的package包/类
/**
 * @return {@link it.gmariotti.cardslib.library.view.CardGridView}
 */
public CardGridView getCardGridView() {
    return mCardGridView;
}
 
开发者ID:Daniele-Comi,项目名称:System-Monitor,代码行数:7,代码来源:CardGridCursorAdapter.java


示例12: onResume

import it.gmariotti.cardslib.library.view.CardGridView; //导入依赖的package包/类
@Override
protected void onResume() {
    super.onResume();
    progress.setVisibility(View.VISIBLE);
    ParseQuery<ParseObject> query = ParseQuery.getQuery("VotingCommand");
    query.addDescendingOrder("votes");
    query.setLimit(1000);
    ((FloatingActionButton) findViewById(R.id.suggest)).hide();
    query.findInBackground(new FindCallback<ParseObject>() {
        @Override
        public void done(final List<ParseObject> parseObjects, ParseException e) {
            if (e == null) {
                ArrayList<Card> cards = new ArrayList<Card>();
                for (ParseObject command : parseObjects) {

                    cards.add(new MostWantedVotingCard(VotingActivity.this, command));

                }
                final CardGridArrayAdapter mCardArrayAdapter = new CardGridArrayAdapter(VotingActivity.this, cards);
                final CardGridView listView = (CardGridView) findViewById(R.id.card_list_view);

                final SwingBottomInAnimationAdapter animCardArrayAdapter = new SwingBottomInAnimationAdapter(mCardArrayAdapter);
                animCardArrayAdapter.setAbsListView(listView);
                listView.setExternalAdapter(animCardArrayAdapter, mCardArrayAdapter);
                progress.setVisibility(View.GONE);
                FloatingActionButton b = (FloatingActionButton) findViewById(R.id.suggest);
                b.show();
                b.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        new MaterialDialog.Builder(VotingActivity.this)
                                .title(getString(R.string.suggest_new))
                                .theme(Theme.LIGHT)  // the default is light, so you don't need this line
                                .customView(R.layout.suggest_command, true)
                                .positiveText(getString(R.string.submit))  // the default is 'OK'
                                .negativeText(R.string.cancel)  // leaving this line out will remove the negative button
                                .callback(new MaterialDialog.ButtonCallback() {
                                    @Override
                                    public void onPositive(MaterialDialog materialDialog) {
                                        String name = ((EditText) materialDialog.getCustomView().findViewById(R.id.name)).getText().toString();
                                        String detail = ((EditText) materialDialog.getCustomView().findViewById(R.id.detailSuggest)).getText().toString();
                                        ParseObject votingCommand = new ParseObject("VotingCommand");
                                        votingCommand.put("title", name);
                                        votingCommand.put("detail", detail);
                                        votingCommand.put("votes", 0);
                                        votingCommand.saveInBackground();
                                        mCardArrayAdapter.add(new MostWantedVotingCard(VotingActivity.this, votingCommand));
                                        animCardArrayAdapter.notifyDataSetChanged();
                                    }
                                })
                                .build()
                                .show();
                    }
                });

            }
        }
    });

}
 
开发者ID:RSenApps,项目名称:Commandr-Android,代码行数:61,代码来源:VotingActivity.java


示例13: setCardGridView

import it.gmariotti.cardslib.library.view.CardGridView; //导入依赖的package包/类
/**
 * Sets the {@link CardGridView}
 *
 * @param cardGridView cardGridView
 */
public void setCardGridView(CardGridView cardGridView) {
    this.mCardGridView = cardGridView;
}
 
开发者ID:Daniele-Comi,项目名称:System-Monitor,代码行数:9,代码来源:CardGridArrayAdapter.java


示例14: setCardGridView

import it.gmariotti.cardslib.library.view.CardGridView; //导入依赖的package包/类
/**
 * Sets the {@link it.gmariotti.cardslib.library.view.CardListView}
 *
 * @param cardGridView cardGridView
 */
public void setCardGridView(CardGridView cardGridView) {
    this.mCardGridView = cardGridView;
}
 
开发者ID:Daniele-Comi,项目名称:System-Monitor,代码行数:9,代码来源:CardGridCursorAdapter.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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