This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README

cardslib

Card Library provides an easy way to display a UI Card using the Official Google CardView in your homs app.

How to build?

1.Delete the visible tag from the config.json file.
2.For entry running requirements, use DevEco Studio and download the openHarmonySDK.
Change the dependencies→classpath version in the build.gradle file to the corresponding version. (that is, the version used in your IDE's new project)

How to use for your project?

gradle

allprojects{
    repositories{
        mavenCentral()
    }
}
implementation 'io.openharmony.tpc.thirdlib:cardslib_core:1.0.1'
implementation 'io.openharmony.tpc.thirdlib:cardslib_cards:1.0.1'

How to use?

Create a Card

   //Create a Card
        Card card = new Card(this);

        //Create a CardHeader
        CardHeader header = new CardHeader(this);

        //Set the header title
        try {
            header.setTitle(getResourceManager().getElement(ResourceTable.String_demo_header_basetitle).getString());
        } catch (Exception e) {
            HiLog.error(Constants.LABEL_LOG, e.toString());
        }

        card.addCardHeader(header);

        //Set card in the CardView
        CardView cardView = (CardView) findComponentById(ResourceTable.Id_carddemo_header_std);
        cardView.setCard(card);

addCardExpand

         header.setButtonExpandVisible(true);
        //This provides a simple (and useless) expand area
        CardExpand expand = new CardExpand(this);
        //Set inner title in Expand Area
        try {
            expand.setTitle(getResourceManager().getElement(ResourceTable.String_demo_expand_basetitle).getString());
        } catch (Exception e) {
            HiLog.error(Constants.LABEL_LOG, e.toString());
        }
        card.addCardExpand(expand);

##screenshot

card add header card add expand
material_card top_color_expand
:---: :---:
list_base refresh_card
:---: :---:
list_different_layout list_sections
:---: :---:
misc colored_cards
:---: :---:

License

Copyright 2013-2014 Gabriele Mariotti

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Empty file

About

Card Library provides an easy way to display a UI Card using the Official Google CardView in your homs app. expand collapse
Cancel

Releases

No release

Contributors

All

Activities

can not load any more
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化