All Projects → zolad → BubbleTextureView

zolad / BubbleTextureView

Licence: other
Custom bubble shape TextureView for Android, OpenGL surface implementation using TextureView. 自定义气泡形状的TextureView,使用OpenGL实现

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to BubbleTextureView

ShaderView
ShaderView is an Android View that makes it easy to use GLSL shaders for your app. It's the modern way to use shaders for Android instead of RenderScript.
Stars: ✭ 53 (-39.77%)
Mutual labels:  textureview
Yjplay
一个支持自定义UI布局,流式API, 加密,直播 ,亮度,音量,快进等手势 ,广告视频预览,多种加载模式 ,多种分辨率切换 ,多种封面图, 自定义数据源,列表播放,倍数播放,边播变缓存<font color="red">不是使用AndroidVideoCache</font>,离线播放,神奇的播放器
Stars: ✭ 1,700 (+1831.82%)
Mutual labels:  textureview
Playerbase
The basic library of Android player will process complex business components. The access is simple。Android播放器基础库,专注于播放视图组件的高复用性和组件间的低耦合,轻松处理复杂业务。
Stars: ✭ 2,814 (+3097.73%)
Mutual labels:  textureview

BubbleTextureView

Custom bubble shape TextureView for Android, OpenGL surface implementation using TextureView. 自定义气泡形状的TextureView,使用OpenGL实现

screenshot1~

Features

  • Custom radius,arrow position and arrow size
  • shape textureview by opengl

Dependency

Add this in your build.gradle file

compile 'com.zolad:bubbletextureview:1.0.0'

Usage

1.layout xml

  <com.zolad.bubbletextureview.BubbleTextureView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>

  

2.Set radius, arrow size,arrow direction(left or right),arrow position

  /**
     * set corner radius  and  arrow size and arrow direction
     *
     * @param radius       float,pixels,  the corner radius of each corner.
     * @param arrowSize    float,range (0f<arrowSize<1.0f) the size percent of arrow
     * @param arrowOffsetFromCenter  float,range  (-1.0f<arrowSize<1.0f) arrow offset from center
     * @param arrowDirection  boolean,true is left,false is right, the direction of arrow
     */
  mBubbleTextureView.setCornerRadiusAndArrow(40,0.12f, 0.6f,true);
  
  /**
    * use surface in this callback
    */
  mBubbleTextureView.setSurfaceListner(new SurfaceListener() {
            @Override
            public void onSurfaceCreated(SurfaceTexture surface) {
               
               //use surface
            }
        });
        

License

Copyright 2018 Zolad

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.
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].