├── .classpath ├── .gitattributes ├── .gitignore ├── .project ├── AndroidManifest.xml ├── README.md ├── demo_pic.png ├── gen └── com │ └── multiedittext │ └── example │ ├── BuildConfig.java │ └── R.java ├── libs └── android-support-v4.jar ├── proguard-project.txt ├── project.properties ├── res ├── drawable-hdpi │ └── ic_launcher.jpg ├── layout │ └── main.xml └── values │ ├── attrs.xml │ ├── color.xml │ ├── multiedittext_default.xml │ ├── strings.xml │ └── styles.xml └── src └── com └── multiedittext └── example ├── BaseActivity.java ├── MainActivity.java └── widget └── MultiEditText.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # ========================= 18 | # Operating System Files 19 | # ========================= 20 | 21 | # OSX 22 | # ========================= 23 | 24 | .DS_Store 25 | .AppleDouble 26 | .LSOverride 27 | 28 | # Icon must end with two \r 29 | Icon 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | 38 | # Directories potentially created on remote AFP share 39 | .AppleDB 40 | .AppleDesktop 41 | Network Trash Folder 42 | Temporary Items 43 | .apdisk 44 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | MultiEditText 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 9 | 10 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | MultiEditText 2 | ============= 3 | 4 | MultiEditText 是一个多字符分开输入显示的一个输入框! 5 | 可设置长度,是否隐藏文本,颜色 、边框等! 6 | 如图: 7 | ![image](https://github.com/arlong/MultiEditText/blob/master/demo_pic.png) 8 | -------------------------------------------------------------------------------- /demo_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arlong/MultiEditText/6244e87e0b8fee4b7e700e2720c8971124da429c/demo_pic.png -------------------------------------------------------------------------------- /gen/com/multiedittext/example/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /** Automatically generated file. DO NOT MODIFY */ 2 | package com.multiedittext.example; 3 | 4 | public final class BuildConfig { 5 | public final static boolean DEBUG = true; 6 | } -------------------------------------------------------------------------------- /gen/com/multiedittext/example/R.java: -------------------------------------------------------------------------------- 1 | /* AUTO-GENERATED FILE. DO NOT MODIFY. 2 | * 3 | * This class was automatically generated by the 4 | * aapt tool from the resource data it found. It 5 | * should not be modified by hand. 6 | */ 7 | 8 | package com.multiedittext.example; 9 | 10 | public final class R { 11 | public static final class attr { 12 | /**

Must be a color value, in the form of "#rgb", "#argb", 13 | "#rrggbb", or "#aarrggbb". 14 |

This may also be a reference to a resource (in the form 15 | "@[package:]type:name") or 16 | theme attribute (in the form 17 | "?[package:][type:]name") 18 | containing a value of this type. 19 | */ 20 | public static final int borderColor=0x7f010001; 21 | /**

Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp". 22 | Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), 23 | in (inches), mm (millimeters). 24 |

This may also be a reference to a resource (in the form 25 | "@[package:]type:name") or 26 | theme attribute (in the form 27 | "?[package:][type:]name") 28 | containing a value of this type. 29 | */ 30 | public static final int borderRadius=0x7f010002; 31 | /**

Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp". 32 | Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), 33 | in (inches), mm (millimeters). 34 |

This may also be a reference to a resource (in the form 35 | "@[package:]type:name") or 36 | theme attribute (in the form 37 | "?[package:][type:]name") 38 | containing a value of this type. 39 | */ 40 | public static final int borderWidth=0x7f010000; 41 | /**

Must be a color value, in the form of "#rgb", "#argb", 42 | "#rrggbb", or "#aarrggbb". 43 |

This may also be a reference to a resource (in the form 44 | "@[package:]type:name") or 45 | theme attribute (in the form 46 | "?[package:][type:]name") 47 | containing a value of this type. 48 | */ 49 | public static final int multiColor=0x7f010005; 50 | /**

Must be an integer value, such as "100". 51 |

This may also be a reference to a resource (in the form 52 | "@[package:]type:name") or 53 | theme attribute (in the form 54 | "?[package:][type:]name") 55 | containing a value of this type. 56 | */ 57 | public static final int multiLength=0x7f010003; 58 | /**

Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp". 59 | Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), 60 | in (inches), mm (millimeters). 61 |

This may also be a reference to a resource (in the form 62 | "@[package:]type:name") or 63 | theme attribute (in the form 64 | "?[package:][type:]name") 65 | containing a value of this type. 66 | */ 67 | public static final int multiRadius=0x7f010006; 68 | /**

Must be a boolean value, either "true" or "false". 69 |

This may also be a reference to a resource (in the form 70 | "@[package:]type:name") or 71 | theme attribute (in the form 72 | "?[package:][type:]name") 73 | containing a value of this type. 74 | */ 75 | public static final int multiTextVisible=0x7f010007; 76 | /**

Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp". 77 | Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), 78 | in (inches), mm (millimeters). 79 |

This may also be a reference to a resource (in the form 80 | "@[package:]type:name") or 81 | theme attribute (in the form 82 | "?[package:][type:]name") 83 | containing a value of this type. 84 | */ 85 | public static final int multiWidth=0x7f010004; 86 | } 87 | public static final class color { 88 | public static final int black=0x7f040001; 89 | public static final int blue=0x7f040004; 90 | public static final int default_ev_border_color=0x7f040008; 91 | public static final int default_ev_multi_color=0x7f040009; 92 | public static final int gray=0x7f040007; 93 | public static final int green=0x7f040005; 94 | public static final int red=0x7f040002; 95 | public static final int tran=0x7f040003; 96 | public static final int white=0x7f040000; 97 | public static final int yellow=0x7f040006; 98 | } 99 | public static final class dimen { 100 | public static final int custom_ev_border_radius=0x7f050005; 101 | public static final int custom_ev_border_width=0x7f050004; 102 | public static final int custom_ev_multi_width=0x7f050006; 103 | public static final int default_ev_border_radius=0x7f050001; 104 | public static final int default_ev_border_width=0x7f050000; 105 | public static final int default_ev_multi_radius=0x7f050003; 106 | public static final int default_ev_multi_width=0x7f050002; 107 | } 108 | public static final class drawable { 109 | public static final int ic_launcher=0x7f020000; 110 | } 111 | public static final class id { 112 | public static final int button1=0x7f090002; 113 | public static final int button2=0x7f090003; 114 | public static final int button3=0x7f090004; 115 | public static final int button4=0x7f090005; 116 | public static final int edittext1=0x7f090000; 117 | public static final int edittext2=0x7f090001; 118 | } 119 | public static final class integer { 120 | public static final int default_ev_multi_length=0x7f060000; 121 | } 122 | public static final class layout { 123 | public static final int main=0x7f030000; 124 | } 125 | public static final class string { 126 | public static final int app_name=0x7f070000; 127 | } 128 | public static final class style { 129 | /** 130 | Base application theme, dependent on API level. This theme is replaced 131 | by AppBaseTheme from res/values-vXX/styles.xml on newer devices. 132 | 133 | 134 | 139 | 140 | Application theme. 141 | All customizations that are NOT specific to a particular API-level can go here. 142 | */ 143 | public static final int AppTheme=0x7f080000; 144 | } 145 | public static final class styleable { 146 | /** Attributes that can be used with a MultiEditText. 147 |

Includes the following attributes:

148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 |
AttributeDescription
{@link #MultiEditText_borderColor com.multiedittext.example:borderColor}
{@link #MultiEditText_borderRadius com.multiedittext.example:borderRadius}
{@link #MultiEditText_borderWidth com.multiedittext.example:borderWidth}
{@link #MultiEditText_multiColor com.multiedittext.example:multiColor}
{@link #MultiEditText_multiLength com.multiedittext.example:multiLength}
{@link #MultiEditText_multiRadius com.multiedittext.example:multiRadius}
{@link #MultiEditText_multiTextVisible com.multiedittext.example:multiTextVisible}
{@link #MultiEditText_multiWidth com.multiedittext.example:multiWidth}
161 | @see #MultiEditText_borderColor 162 | @see #MultiEditText_borderRadius 163 | @see #MultiEditText_borderWidth 164 | @see #MultiEditText_multiColor 165 | @see #MultiEditText_multiLength 166 | @see #MultiEditText_multiRadius 167 | @see #MultiEditText_multiTextVisible 168 | @see #MultiEditText_multiWidth 169 | */ 170 | public static final int[] MultiEditText = { 171 | 0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003, 172 | 0x7f010004, 0x7f010005, 0x7f010006, 0x7f010007 173 | }; 174 | /** 175 |

This symbol is the offset where the {@link com.multiedittext.example.R.attr#borderColor} 176 | attribute's value can be found in the {@link #MultiEditText} array. 177 | 178 | 179 |

Must be a color value, in the form of "#rgb", "#argb", 180 | "#rrggbb", or "#aarrggbb". 181 |

This may also be a reference to a resource (in the form 182 | "@[package:]type:name") or 183 | theme attribute (in the form 184 | "?[package:][type:]name") 185 | containing a value of this type. 186 | @attr name com.multiedittext.example:borderColor 187 | */ 188 | public static final int MultiEditText_borderColor = 1; 189 | /** 190 |

This symbol is the offset where the {@link com.multiedittext.example.R.attr#borderRadius} 191 | attribute's value can be found in the {@link #MultiEditText} array. 192 | 193 | 194 |

Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp". 195 | Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), 196 | in (inches), mm (millimeters). 197 |

This may also be a reference to a resource (in the form 198 | "@[package:]type:name") or 199 | theme attribute (in the form 200 | "?[package:][type:]name") 201 | containing a value of this type. 202 | @attr name com.multiedittext.example:borderRadius 203 | */ 204 | public static final int MultiEditText_borderRadius = 2; 205 | /** 206 |

This symbol is the offset where the {@link com.multiedittext.example.R.attr#borderWidth} 207 | attribute's value can be found in the {@link #MultiEditText} array. 208 | 209 | 210 |

Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp". 211 | Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), 212 | in (inches), mm (millimeters). 213 |

This may also be a reference to a resource (in the form 214 | "@[package:]type:name") or 215 | theme attribute (in the form 216 | "?[package:][type:]name") 217 | containing a value of this type. 218 | @attr name com.multiedittext.example:borderWidth 219 | */ 220 | public static final int MultiEditText_borderWidth = 0; 221 | /** 222 |

This symbol is the offset where the {@link com.multiedittext.example.R.attr#multiColor} 223 | attribute's value can be found in the {@link #MultiEditText} array. 224 | 225 | 226 |

Must be a color value, in the form of "#rgb", "#argb", 227 | "#rrggbb", or "#aarrggbb". 228 |

This may also be a reference to a resource (in the form 229 | "@[package:]type:name") or 230 | theme attribute (in the form 231 | "?[package:][type:]name") 232 | containing a value of this type. 233 | @attr name com.multiedittext.example:multiColor 234 | */ 235 | public static final int MultiEditText_multiColor = 5; 236 | /** 237 |

This symbol is the offset where the {@link com.multiedittext.example.R.attr#multiLength} 238 | attribute's value can be found in the {@link #MultiEditText} array. 239 | 240 | 241 |

Must be an integer value, such as "100". 242 |

This may also be a reference to a resource (in the form 243 | "@[package:]type:name") or 244 | theme attribute (in the form 245 | "?[package:][type:]name") 246 | containing a value of this type. 247 | @attr name com.multiedittext.example:multiLength 248 | */ 249 | public static final int MultiEditText_multiLength = 3; 250 | /** 251 |

This symbol is the offset where the {@link com.multiedittext.example.R.attr#multiRadius} 252 | attribute's value can be found in the {@link #MultiEditText} array. 253 | 254 | 255 |

Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp". 256 | Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), 257 | in (inches), mm (millimeters). 258 |

This may also be a reference to a resource (in the form 259 | "@[package:]type:name") or 260 | theme attribute (in the form 261 | "?[package:][type:]name") 262 | containing a value of this type. 263 | @attr name com.multiedittext.example:multiRadius 264 | */ 265 | public static final int MultiEditText_multiRadius = 6; 266 | /** 267 |

This symbol is the offset where the {@link com.multiedittext.example.R.attr#multiTextVisible} 268 | attribute's value can be found in the {@link #MultiEditText} array. 269 | 270 | 271 |

Must be a boolean value, either "true" or "false". 272 |

This may also be a reference to a resource (in the form 273 | "@[package:]type:name") or 274 | theme attribute (in the form 275 | "?[package:][type:]name") 276 | containing a value of this type. 277 | @attr name com.multiedittext.example:multiTextVisible 278 | */ 279 | public static final int MultiEditText_multiTextVisible = 7; 280 | /** 281 |

This symbol is the offset where the {@link com.multiedittext.example.R.attr#multiWidth} 282 | attribute's value can be found in the {@link #MultiEditText} array. 283 | 284 | 285 |

Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp". 286 | Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), 287 | in (inches), mm (millimeters). 288 |

This may also be a reference to a resource (in the form 289 | "@[package:]type:name") or 290 | theme attribute (in the form 291 | "?[package:][type:]name") 292 | containing a value of this type. 293 | @attr name com.multiedittext.example:multiWidth 294 | */ 295 | public static final int MultiEditText_multiWidth = 4; 296 | }; 297 | } 298 | -------------------------------------------------------------------------------- /libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arlong/MultiEditText/6244e87e0b8fee4b7e700e2720c8971124da429c/libs/android-support-v4.jar -------------------------------------------------------------------------------- /proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-19 15 | android.library.reference.1=../appcompat_v7 16 | -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_launcher.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arlong/MultiEditText/6244e87e0b8fee4b7e700e2720c8971124da429c/res/drawable-hdpi/ic_launcher.jpg -------------------------------------------------------------------------------- /res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 19 | 20 | 39 | 40 | 46 | 47 |