All Projects → xuexiangjys → XFloatView

xuexiangjys / XFloatView

Licence: other
一个简易的悬浮窗实现方案

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to XFloatView

Xupdate
🚀A lightweight, high availability Android version update framework.(一个轻量级、高可用性的Android版本更新框架)
Stars: ✭ 1,688 (+2914.29%)
Mutual labels:  android-ui, xui, x-library
Xui
💍A simple and elegant Android native UI framework, free your hands! (一个简洁而优雅的Android原生UI框架,解放你的双手!)
Stars: ✭ 3,571 (+6276.79%)
Mutual labels:  android-ui, xui, x-library
Image-Support
Add badge with counter to ImageView Android.
Stars: ✭ 128 (+128.57%)
Mutual labels:  android-ui
Storyblok-Android-SDK
Storyblok MP SDK available here: https://github.com/mikepenz/storyblok-mp-SDK
Stars: ✭ 13 (-76.79%)
Mutual labels:  android-ui
EasyFont
Android Library to set font of TextView, Button, EditText, and RadioButton in XML without editing Java code to set Typeface.
Stars: ✭ 20 (-64.29%)
Mutual labels:  android-ui
RTL-Toast
Android Toast For RTL Applications
Stars: ✭ 16 (-71.43%)
Mutual labels:  android-ui
Extract-Color-Palette-Api
Create gradient drawable by extracting prominent colors from image⚫⚪
Stars: ✭ 16 (-71.43%)
Mutual labels:  android-ui
logregform-android
Login and registration form for Android (IceCream Sandwich+) with additional features, enchancement and dynamic GUI.
Stars: ✭ 25 (-55.36%)
Mutual labels:  android-ui
Weather
Android自定义View-小米MIUI8天气动画(晴天)
Stars: ✭ 27 (-51.79%)
Mutual labels:  android-ui
Attribouter
A lightweight "about screen" library to allow quick but customizable attribution in Android apps.
Stars: ✭ 117 (+108.93%)
Mutual labels:  android-ui
TicTacToeUI-Android
Check out the new style for App Design aims for Tic Tac Toe Game...😉😀😁😎
Stars: ✭ 40 (-28.57%)
Mutual labels:  android-ui
kooldown
Circular progress animation with duration
Stars: ✭ 17 (-69.64%)
Mutual labels:  android-ui
CodeView
Android Library to make it easy to create an Code editor or IDE that support any languages and themes, with auto complete, auto indenting, snippets and more features
Stars: ✭ 254 (+353.57%)
Mutual labels:  android-ui
tools-sample
Collection of examples on how to improve preview of your layout
Stars: ✭ 20 (-64.29%)
Mutual labels:  android-ui
Google-Maps-BottomSheet
A BottomSheetBehavior framework mirroring Google Maps'
Stars: ✭ 75 (+33.93%)
Mutual labels:  android-ui
RxLoading
RxJava library for showing a loading (i.e. progress bar) state while waiting for async data with minimal effort and advanced options.
Stars: ✭ 49 (-12.5%)
Mutual labels:  android-ui
YuanaItemSettingView
Customizable Item Setting View Android
Stars: ✭ 15 (-73.21%)
Mutual labels:  android-ui
ArcLayout
Arc Layout is a view group with which you can add a arc-shaped container in your layout.
Stars: ✭ 32 (-42.86%)
Mutual labels:  android-ui
media-picker
Easy customizable picker for all your needs in Android application
Stars: ✭ 167 (+198.21%)
Mutual labels:  android-ui
android-custom-view
No description or website provided.
Stars: ✭ 15 (-73.21%)
Mutual labels:  android-ui

XFloatView

xfv api

一个简易的悬浮窗实现方案

关于我

github csdn

特征

  • 支持自定义布局的悬浮窗。

  • 支持自定义拖动事件、点击事件。

  • 支持悬浮窗自动吸附效果。

  • 支持初始化悬浮窗的位置。

  • 支持悬浮窗翻转吸附。


1、演示(请star支持)

1.1、Demo演示动画

1.2、Demo下载

downloads

2、如何使用

目前支持主流开发工具AndroidStudio的使用,直接配置build.gradle,增加依赖即可.

2.1、Android Studio导入方法,添加Gradle依赖

1.先在项目根目录的 build.gradle 的 repositories 添加:

allprojects {
     repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}

2.然后在dependencies添加:

dependencies {
  ...
  implementation 'com.github.xuexiangjys:XFloatView:1.0.1'
}

2.2、继承XFloatView,实现自定义窗体

主要需要实现如下抽象方法:

/**
 * @return 获取根布局的ID
 */
protected abstract int getLayoutId();

/**
 * @return 能否移动或者触摸响应
 */
protected abstract boolean canMoveOrTouch();

/**
 * 初始化悬浮控件
 */
protected abstract void initFloatView();

/**
 * 初始化监听
 */
protected abstract void initListener();

/**
 * @return 设置悬浮框是否吸附在屏幕边缘
 */
protected abstract boolean isAdsorbView();

点击查看示例代码

2.3、悬浮窗的权限申请

FloatWindowPermission.getInstance().applyFloatWindowPermission(getContext());

联系方式

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].