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

OSCHINA-MIRROR/HarmonyOS-tpc-DraggableView

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать

A permissive license whose main conditions require preservation of copyright and license notices. Contributors provide an express grant of patent rights. Licensed works, modifications, and larger works may be distributed under different terms and without source code.

Permissions
  • Commercial use
  • Modification
  • Distribution
  • Patent use
  • Private use
Limitations
  • Trademark use
  • Liability
  • Warranty
Conditions
  • License and copyright notice
  • State changes
README.md 1.5 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
yu Отправлено 17.04.2021 04:16 c9e0fc6

作者声明:

本库基于原项目(https://github.com/elevenetc/DraggableView)开发openharmony项目。 由于openharmony暂时没有找到让Component转PixelMap的方案,所以这里暂时只支持Image设置image_src图片的方式, 并且设置ohos:scale_mode="stretch" 这样可以暂且做到与原库效果完全一致。 待有Component转PixelMap方案将会再更新。

DraggableView

Draggable image with rotation and skew/scale effects.

SkewView

animation

RotateView

animation

Usage

dependencies{
   implementation 'io.openharmony.tpc.thirdlib:DraggableView:1.0.0'
}
  1. Implement DragController.IDragViewGroup
  2. Create instance of DragController
  3. Override onTouchEvent of your ComponentContainer and call DragController#onTouchEvent:
@Override public boolean onTouchEvent(MotionEvent event, Component component) {
	return dragController.onTouchEvent(event, component);
}

See full sample at SampleGridContainer

Animation adjustments

SkewView and RotateView containe multipliers which change rotation, skew and scale values.

Licence

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

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

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

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