All Projects → KingJA → SuperShapeView

KingJA / SuperShapeView

Licence: other
A smart custom view support shapes for ImageView, TextView ,EditView ,instead of shape.xml.(自定义形状控件,支持TextView,EditText)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to SuperShapeView

ShapeView
打造万能shape,再也不用写很多xml了,可以当做TextView,Button,EditText等多种控件,方便实用
Stars: ✭ 34 (-43.33%)
Mutual labels:  textview, edittext, shapeview
TextViewPlus
an android library for setting custom font in xml layout
Stars: ✭ 27 (-55%)
Mutual labels:  textview, edittext
Hyena
鬣狗快速开发库(2018年6月停止维护)
Stars: ✭ 21 (-65%)
Mutual labels:  textview, edittext
textmatcher
A simple text watcher that matches specific targets like mention or hashtag in a string by defining rules
Stars: ✭ 67 (+11.67%)
Mutual labels:  textview, edittext
CustomEditText
Simple Custom EditText for Android like Instagram
Stars: ✭ 23 (-61.67%)
Mutual labels:  edittext, customview
Codeeditor
Code Editor Native Way
Stars: ✭ 155 (+158.33%)
Mutual labels:  edittext, customview
EasyMoney-Widgets
The widgets (EditText and TextView) for support of money requirements like currency, number formatting, comma formatting etc.
Stars: ✭ 91 (+51.67%)
Mutual labels:  textview, edittext
Rxmarkdown
📠Markdown for Android, supports TextView && EditText (Live Preview), supports code high light.
Stars: ✭ 714 (+1090%)
Mutual labels:  textview, edittext
Gsyricktext
类似微博的emoji表情、@人、话题等的EdiText,优化了编辑框中的光标点击和删除处理。TextView支持emoji表情、话题、链接、电话和@某人特殊显示的文本。
Stars: ✭ 651 (+985%)
Mutual labels:  textview, edittext
Spedittool
An efficient and scalable library for inputing and displaying gif or @mention on graph-text mixed TextView/EditText
Stars: ✭ 292 (+386.67%)
Mutual labels:  textview, edittext
RotatableAutofitEditText
Extended EditText which allows to move, rotate and resize text at the same time
Stars: ✭ 51 (-15%)
Mutual labels:  edittext, customview
Sharpview
安卓带有尖角气泡的控件(TextView,ImageView,EditText,Layout),支持渐变色,圆角等自定义属性
Stars: ✭ 137 (+128.33%)
Mutual labels:  textview, edittext
KodeEditor
A simple code editor with syntax highlighting and pinch to zoom
Stars: ✭ 60 (+0%)
Mutual labels:  textview, edittext
CustomFontView
Custom View classes for TextView, EditText & Buttons - to set custom fonts
Stars: ✭ 26 (-56.67%)
Mutual labels:  textview, edittext
Xrichtext
一个Android富文本类库,支持图文混排,支持编辑和预览,支持插入和删除图片。
Stars: ✭ 1,639 (+2631.67%)
Mutual labels:  textview, edittext
Toggleedittextview
Easily switch between EditText and TextView seamlessly.
Stars: ✭ 146 (+143.33%)
Mutual labels:  textview, edittext
Html Textview
TextView to display simple HTML
Stars: ✭ 2,445 (+3975%)
Mutual labels:  textview
CodeEditText
验证码,密码输入框。支持密码、明文展示。背景支持边框、填充、下划线展示。支持自定义背景和文本样式
Stars: ✭ 25 (-58.33%)
Mutual labels:  edittext
Rskplaceholdertextview
A light-weight UITextView subclass that adds support for placeholder.
Stars: ✭ 192 (+220%)
Mutual labels:  textview
TypedTextView
Custom implementation of Android's TextView simulating a keyboard/type-writer.
Stars: ✭ 57 (-5%)
Mutual labels:  textview

SuperShapeView

A smart custom view support shapes for TextView ,EditView ,ImageView and so on,instead of shape.xml. CLICK THE STAR if it's useful for you.

Preview

Custom attribute

attribute format example
super_cornerRadius dimension app:super_cornerRadius="5dp"
super_strokeWidth dimension app:super_strokeWidth="1dp"
super_strokeColor color/reference app:super_strokeColor="#bebebe"
super_solidColor color/reference app:super_solidColor="@color/red"
super_dashWidth dimension app:super_dashWidth="2dp"
super_dashGap dimension app:super_dashGap="2dp"
super_topLeftRadius dimension app:super_topLeftRadius="2dp"
super_topRightRadius dimension app:super_topRightRadius="2dp"
super_bottomLeftRadius dimension app:super_bottomLeftRadius="2dp"
super_bottomRightRadius dimension app:super_bottomRightRadius="2dp"

Gradle

 compile 'com.kingja.supershapeview:supershapeview:1.2.0'

Usage

Build in xml
  • Image Shape
<com.kingja.supershapeview.view.SuperShapeImageView
    android:id="@+id/ssiv"
    android:layout_width="100dp"
    android:layout_height="100dp"
    android:layout_marginLeft="12dp"
    android:layout_marginRight="12dp"
    android:onClick="changeIvStyle"
    android:scaleType="centerCrop"
    android:src="@mipmap/taylor"
    app:super_cornerRadius="50dp"
    app:super_strokeColor="#000000"
    app:super_strokeWidth="2dp"/>
  • Others
<com.kingja.supershapeview.view.SuperShapeTextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:padding="12dp"
    android:text="更多"
    android:textColor="#d2490e"
    app:super_dashGap="2dp"
    app:super_dashWidth="2dp"
    app:super_solidColor="#ffffff"
    app:super_strokeColor="#d2490e"
    app:super_strokeWidth="1dp"/>
Modify attrs dynamically
SuperShapeTextView superShapeTextView = (SuperShapeTextView) view;
SuperManager superManager = superShapeTextView.getSuperManager();
superManager.setSolidColor(0xff303F9F);
superManager.setStrokeColor(getResources().getColor(R.color.colorAccent));
superManager.setCorner(20);//DP
superManager.setStrokeWidth(2);//DP
superManager.setDashGap(2);//DP
superManager.setDashWidth(2);//DP
superManager.setCorner(10,6,10,6);
...

Download Demo

Changelog

v1.2.0

  • provide API for setting attrs
  • provide Shape for ImageView (SuperShapeImageView)

v1.1.1

  • Initial release

Contact me

Any questions:Welcome to contact me.

License

Copyright 2017 KingJA

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