1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/HarmonyOS-tpc-Swipecards

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
README.md 2.5 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
gitlife-traslator Отправлено 25.11.2024 09:24 697fe95

Swipecards

Данный проект является результатом переноса и разработки на основе открытого проекта Swipecards. Исходную версию для Android можно отследить по тегам проекта и адресу GitHub (https://github.com/Diolor/Swipecards).

Проект представляет собой:

  • Пользовательские карточки;
  • Возможность удаления карточек с помощью жеста влево-вправо;
  • Возврат и восстановление карточек после жеста вверх-вниз.

Интеграция:

Способ 1:

Добавьте файл har в папку libs модуля entry. В файле gradle модуля entry добавьте следующий код:

implementation fileTree(dir: 'libs', include: ['.jar', '.har'])

Способ 2:

В разделе allprojects добавьте следующие строки:

    repositories {
        mavenCentral()
    }

и строку:

implementation 'io.openharmony.tpc.thirdlib:Swipecards:1.0.2'

Руководство по использованию:

  1. Добавьте SwipeFlingAdapterView в XML-макет:
  <com.lorentzos.flingswipe.SwipeFlingAdapterView
      ohos:id="$+id:frame"
      ohos:width="match_parent"
      ohos:height="match_parent"
      ohos:background_element="$graphic:background_ability_main"/>
  1. В Ability добавьте:
flingContainer = (SwipeFlingAdapterView) findComponentById(ResourceTable.Id_frame);
mProvider = new BaseAdapter(this);
mProvider.setData(al);
flingContainer.setItemProvider(mProvider);

Информация об авторских правах и лицензиях:

Copyright 2014 Dionysis Lorentzos

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.

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/HarmonyOS-tpc-Swipecards.git
git@api.gitlife.ru:oschina-mirror/HarmonyOS-tpc-Swipecards.git
oschina-mirror
HarmonyOS-tpc-Swipecards
HarmonyOS-tpc-Swipecards
master