3 | * All Rights Reserved.
4 | */
5 |
6 | package me.zhanghai.android.materialedittext;
7 |
8 | import android.content.res.ColorStateList;
9 | import android.graphics.ColorFilter;
10 | import android.graphics.PorterDuff;
11 | import android.graphics.drawable.Drawable;
12 | import android.support.annotation.ColorInt;
13 | import android.support.annotation.NonNull;
14 | import android.support.annotation.Nullable;
15 |
16 | /**
17 | * A {@code Drawable} that is tintable.
18 | */
19 | public interface TintableDrawable {
20 |
21 | /**
22 | * Specifies tint color for this drawable.
23 | *
24 | * A Drawable's drawing content will be blended together with its tint
25 | * before it is drawn to the screen. This functions similarly to
26 | * {@link Drawable#setColorFilter(int, PorterDuff.Mode)}.
27 | *
28 | *
29 | * To clear the tint, pass {@code null} to
30 | * {@link #setTintList(ColorStateList)}.
31 | *
32 | * Note: Setting a color filter via
33 | * {@link Drawable#setColorFilter(ColorFilter)} or
34 | * {@link Drawable#setColorFilter(int, PorterDuff.Mode)} overrides tint.
35 | *
36 | *
37 | * @param tintColor Color to use for tinting this drawable
38 | * @see #setTintList(ColorStateList)
39 | * @see #setTintMode(PorterDuff.Mode)
40 | */
41 | void setTint(@ColorInt int tintColor);
42 |
43 | /**
44 | * Specifies tint color for this drawable as a color state list.
45 | *
46 | * A Drawable's drawing content will be blended together with its tint
47 | * before it is drawn to the screen. This functions similarly to
48 | * {@link Drawable#setColorFilter(int, PorterDuff.Mode)}.
49 | *
50 | * Note: Setting a color filter via
51 | * {@link Drawable#setColorFilter(ColorFilter)} or
52 | * {@link Drawable#setColorFilter(int, PorterDuff.Mode)} overrides tint.
53 | *
54 | *
55 | * @param tint Color state list to use for tinting this drawable, or
56 | * {@code null} to clear the tint
57 | * @see #setTint(int)
58 | * @see #setTintMode(PorterDuff.Mode)
59 | */
60 | void setTintList(@Nullable ColorStateList tint);
61 |
62 | /**
63 | * Specifies a tint blending mode for this drawable.
64 | *
65 | * Defines how this drawable's tint color should be blended into the drawable
66 | * before it is drawn to screen. Default tint mode is {@link PorterDuff.Mode#SRC_IN}.
67 | *
68 | * Note: Setting a color filter via
69 | * {@link Drawable#setColorFilter(ColorFilter)} or
70 | * {@link Drawable#setColorFilter(int, PorterDuff.Mode)} overrides tint.
71 | *
72 | *
73 | * @param tintMode A Porter-Duff blending mode
74 | * @see #setTint(int)
75 | * @see #setTintList(ColorStateList)
76 | */
77 | void setTintMode(@NonNull PorterDuff.Mode tintMode);
78 | }
79 |
--------------------------------------------------------------------------------
/library/src/main/java/me/zhanghai/android/materialedittext/internal/FloatProperty.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015 Zhang Hai
3 | * All Rights Reserved.
4 | */
5 |
6 | package me.zhanghai.android.materialedittext.internal;
7 |
8 | import android.util.Property;
9 |
10 | /**
11 | * From {@code android.util.FloatProperty}.
12 | *
13 | * An implementation of {@link android.util.Property} to be used specifically with fields of type
14 | * float
. This type-specific subclass enables performance benefit by allowing
15 | * calls to a {@link #set(Object, Float) set()} function that takes the primitive
16 | * float
type and avoids autoboxing and other overhead associated with the
17 | * Float
class.
18 | *
19 | * @param The class on which the Property is declared.
20 | */
21 | public abstract class FloatProperty extends Property {
22 |
23 | public FloatProperty(String name) {
24 | super(Float.class, name);
25 | }
26 |
27 | /**
28 | * {@inheritDoc}
29 | */
30 | @Override
31 | public final void set(T object, Float value) {
32 | setValue(object, value);
33 | }
34 |
35 | /**
36 | * A type-specific override of the {@link #set(Object, Float)} that is faster when dealing
37 | * with fields of type float
.
38 | *
39 | * @param object The target object.
40 | * @param value The float
type value.
41 | */
42 | public abstract void setValue(T object, float value);
43 | }
44 |
--------------------------------------------------------------------------------
/library/src/main/java/me/zhanghai/android/materialedittext/internal/MathUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015 Zhang Hai
3 | * All Rights Reserved.
4 | */
5 |
6 | package me.zhanghai.android.materialedittext.internal;
7 |
8 | import java.util.Random;
9 |
10 | /**
11 | * From {@code android.util.MathUtils}.
12 | *
13 | * A class that contains utility methods related to numbers.
14 | */
15 | public final class MathUtils {
16 |
17 | private static final Random sRandom = new Random();
18 | private static final float DEG_TO_RAD = 3.1415926f / 180.0f;
19 | private static final float RAD_TO_DEG = 180.0f / 3.1415926f;
20 |
21 | private MathUtils() {}
22 |
23 | public static float abs(float v) {
24 | return v > 0 ? v : -v;
25 | }
26 |
27 | public static int constrain(int amount, int low, int high) {
28 | return amount < low ? low : (amount > high ? high : amount);
29 | }
30 |
31 | public static long constrain(long amount, long low, long high) {
32 | return amount < low ? low : (amount > high ? high : amount);
33 | }
34 |
35 | public static float constrain(float amount, float low, float high) {
36 | return amount < low ? low : (amount > high ? high : amount);
37 | }
38 |
39 | public static float log(float a) {
40 | return (float) Math.log(a);
41 | }
42 |
43 | public static float exp(float a) {
44 | return (float) Math.exp(a);
45 | }
46 |
47 | public static float pow(float a, float b) {
48 | return (float) Math.pow(a, b);
49 | }
50 |
51 | public static float max(float a, float b) {
52 | return a > b ? a : b;
53 | }
54 |
55 | public static float max(int a, int b) {
56 | return a > b ? a : b;
57 | }
58 |
59 | public static float max(float a, float b, float c) {
60 | return a > b ? (a > c ? a : c) : (b > c ? b : c);
61 | }
62 |
63 | public static float max(int a, int b, int c) {
64 | return a > b ? (a > c ? a : c) : (b > c ? b : c);
65 | }
66 |
67 | public static float min(float a, float b) {
68 | return a < b ? a : b;
69 | }
70 |
71 | public static float min(int a, int b) {
72 | return a < b ? a : b;
73 | }
74 |
75 | public static float min(float a, float b, float c) {
76 | return a < b ? (a < c ? a : c) : (b < c ? b : c);
77 | }
78 |
79 | public static float min(int a, int b, int c) {
80 | return a < b ? (a < c ? a : c) : (b < c ? b : c);
81 | }
82 |
83 | public static float dist(float x1, float y1, float x2, float y2) {
84 | final float x = (x2 - x1);
85 | final float y = (y2 - y1);
86 | return (float) Math.hypot(x, y);
87 | }
88 |
89 | public static float dist(float x1, float y1, float z1, float x2, float y2, float z2) {
90 | final float x = (x2 - x1);
91 | final float y = (y2 - y1);
92 | final float z = (z2 - z1);
93 | return (float) Math.sqrt(x * x + y * y + z * z);
94 | }
95 |
96 | public static float mag(float a, float b) {
97 | return (float) Math.hypot(a, b);
98 | }
99 |
100 | public static float mag(float a, float b, float c) {
101 | return (float) Math.sqrt(a * a + b * b + c * c);
102 | }
103 |
104 | public static float sq(float v) {
105 | return v * v;
106 | }
107 |
108 | public static float dot(float v1x, float v1y, float v2x, float v2y) {
109 | return v1x * v2x + v1y * v2y;
110 | }
111 |
112 | public static float cross(float v1x, float v1y, float v2x, float v2y) {
113 | return v1x * v2y - v1y * v2x;
114 | }
115 |
116 | public static float radians(float degrees) {
117 | return degrees * DEG_TO_RAD;
118 | }
119 |
120 | public static float degrees(float radians) {
121 | return radians * RAD_TO_DEG;
122 | }
123 |
124 | public static float acos(float value) {
125 | return (float) Math.acos(value);
126 | }
127 |
128 | public static float asin(float value) {
129 | return (float) Math.asin(value);
130 | }
131 |
132 | public static float atan(float value) {
133 | return (float) Math.atan(value);
134 | }
135 |
136 | public static float atan2(float a, float b) {
137 | return (float) Math.atan2(a, b);
138 | }
139 |
140 | public static float tan(float angle) {
141 | return (float) Math.tan(angle);
142 | }
143 |
144 | public static float lerp(float start, float stop, float amount) {
145 | return start + (stop - start) * amount;
146 | }
147 |
148 | public static float norm(float start, float stop, float value) {
149 | return (value - start) / (stop - start);
150 | }
151 |
152 | public static float map(float minStart, float minStop, float maxStart, float maxStop, float value) {
153 | return maxStart + (maxStart - maxStop) * ((value - minStart) / (minStop - minStart));
154 | }
155 |
156 | public static int random(int howbig) {
157 | return (int) (sRandom.nextFloat() * howbig);
158 | }
159 |
160 | public static int random(int howsmall, int howbig) {
161 | if (howsmall >= howbig) {
162 | return howsmall;
163 | }
164 | return (int) (sRandom.nextFloat() * (howbig - howsmall) + howsmall);
165 | }
166 |
167 | public static float random(float howbig) {
168 | return sRandom.nextFloat() * howbig;
169 | }
170 |
171 | public static float random(float howsmall, float howbig) {
172 | if (howsmall >= howbig) {
173 | return howsmall;
174 | }
175 | return sRandom.nextFloat() * (howbig - howsmall) + howsmall;
176 | }
177 |
178 | public static void randomSeed(long seed) {
179 | sRandom.setSeed(seed);
180 | }
181 | }
182 |
--------------------------------------------------------------------------------
/library/src/main/java/me/zhanghai/android/materialedittext/internal/ThemeUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015 Zhang Hai
3 | * All Rights Reserved.
4 | */
5 |
6 | package me.zhanghai.android.materialedittext.internal;
7 |
8 | import android.content.Context;
9 | import android.content.res.ColorStateList;
10 | import android.content.res.TypedArray;
11 |
12 | public class ThemeUtils {
13 |
14 | private ThemeUtils() {}
15 |
16 | public static int getColorFromAttrRes(int attr, Context context) {
17 | TypedArray a = context.obtainStyledAttributes(new int[] {attr});
18 | try {
19 | return a.getColor(0, 0);
20 | } finally {
21 | a.recycle();
22 | }
23 | }
24 |
25 | public static ColorStateList getColorStateListFromAttrRes(int attr, Context context) {
26 | TypedArray a = context.obtainStyledAttributes(new int[] {attr});
27 | try {
28 | return a.getColorStateList(0);
29 | } finally {
30 | a.recycle();
31 | }
32 | }
33 |
34 | public static float getFloatFromAttrRes(int attrRes, Context context) {
35 | TypedArray a = context.obtainStyledAttributes(new int[] {attrRes});
36 | try {
37 | return a.getFloat(0, 0);
38 | } finally {
39 | a.recycle();
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/library/src/main/java/me/zhanghai/android/materialedittext/internal/ViewCompat.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015 Zhang Hai
3 | * All Rights Reserved.
4 | */
5 |
6 | package me.zhanghai.android.materialedittext.internal;
7 |
8 | import android.graphics.drawable.Drawable;
9 | import android.os.Build;
10 | import android.view.View;
11 |
12 | public class ViewCompat {
13 |
14 | @SuppressWarnings("deprecation")
15 | public static void setBackground(View view, Drawable background) {
16 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
17 | view.setBackground(background);
18 | } else {
19 | view.setBackgroundDrawable(background);
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/sample/.gitignore:
--------------------------------------------------------------------------------
1 | /build/
2 |
--------------------------------------------------------------------------------
/sample/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015 Zhang Hai
3 | * All Rights Reserved.
4 | */
5 |
6 | apply plugin: 'com.android.application'
7 |
8 | android {
9 |
10 | compileSdkVersion Integer.parseInt(project.ANDROID_COMPILE_SDK_VERSION)
11 | buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION
12 |
13 | defaultConfig {
14 | applicationId "me.zhanghai.android.materialedittext.sample"
15 | minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK_VERSION)
16 | targetSdkVersion Integer.parseInt(project.ANDROID_TARGET_SDK_VERSION)
17 | versionCode Integer.parseInt(project.VERSION_CODE)
18 | versionName project.VERSION_NAME
19 | }
20 |
21 | compileOptions {
22 | sourceCompatibility JavaVersion.VERSION_1_8
23 | targetCompatibility JavaVersion.VERSION_1_8
24 | }
25 |
26 | signingConfigs {
27 | release {
28 | storeFile file('../../github.jks')
29 | storePassword System.console() != null ? System.console().readLine("\nKeystore password: ") : ""
30 | keyAlias 'materialedittext'
31 | keyPassword System.console() != null ? System.console().readLine("\nKey password: ") : ""
32 | }
33 | }
34 |
35 | buildTypes {
36 | release {
37 | minifyEnabled true
38 | shrinkResources true
39 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
40 | signingConfig signingConfigs.release
41 | }
42 | }
43 | }
44 |
45 | dependencies {
46 | implementation fileTree(dir: 'libs', include: ['*.jar'])
47 | implementation 'com.android.support:appcompat-v7:28.0.0'
48 | implementation 'com.android.support:design:28.0.0'
49 | implementation 'com.jakewharton:butterknife:9.0.0'
50 | annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0'
51 | implementation project(':library')
52 | }
53 |
--------------------------------------------------------------------------------
/sample/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /opt/android-sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # ButterKnife
20 | -keep class butterknife.** { *; }
21 | -dontwarn butterknife.internal.**
22 | -keep class **$$ViewInjector { *; }
23 | -keepclasseswithmembernames class * {
24 | @butterknife.* ;
25 | }
26 | -keepclasseswithmembernames class * {
27 | @butterknife.* ;
28 | }
29 |
--------------------------------------------------------------------------------
/sample/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
11 |
12 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
34 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/sample/src/main/java/me/zhanghai/android/materialedittext/sample/AboutActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015 Zhang Hai
3 | * All Rights Reserved.
4 | */
5 |
6 | package me.zhanghai.android.materialedittext.sample;
7 |
8 | import android.os.Bundle;
9 | import android.support.v7.app.AppCompatActivity;
10 | import android.text.method.LinkMovementMethod;
11 | import android.view.MenuItem;
12 | import android.widget.TextView;
13 |
14 | import butterknife.BindView;
15 | import butterknife.ButterKnife;
16 |
17 | public class AboutActivity extends AppCompatActivity {
18 |
19 | @BindView(R.id.version)
20 | TextView mVersionText;
21 | @BindView(R.id.github)
22 | TextView mGithubText;
23 |
24 | @Override
25 | protected void onCreate(Bundle savedInstanceState) {
26 | super.onCreate(savedInstanceState);
27 |
28 | setContentView(R.layout.about_activity);
29 | ButterKnife.bind(this);
30 |
31 | getSupportActionBar().setDisplayHomeAsUpEnabled(true);
32 |
33 | String version = getString(R.string.about_version_format, BuildConfig.VERSION_NAME);
34 | mVersionText.setText(version);
35 | mGithubText.setMovementMethod(LinkMovementMethod.getInstance());
36 | }
37 |
38 | @Override
39 | public boolean onOptionsItemSelected(MenuItem item) {
40 | switch (item.getItemId()) {
41 | case android.R.id.home:
42 | AppUtils.navigateUp(this);
43 | return true;
44 | default:
45 | return super.onOptionsItemSelected(item);
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/sample/src/main/java/me/zhanghai/android/materialedittext/sample/AppUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015 Zhang Hai
3 | * All Rights Reserved.
4 | */
5 |
6 | package me.zhanghai.android.materialedittext.sample;
7 |
8 | import android.app.Activity;
9 | import android.content.Intent;
10 | import android.os.Bundle;
11 | import android.support.v4.app.NavUtils;
12 | import android.support.v4.app.TaskStackBuilder;
13 |
14 | public class AppUtils {
15 |
16 | private AppUtils() {}
17 |
18 | // From http://developer.android.com/training/implementing-navigation/ancestral.html#NavigateUp .
19 | public static void navigateUp(Activity activity, Bundle extras) {
20 | Intent upIntent = NavUtils.getParentActivityIntent(activity);
21 | if (upIntent != null) {
22 | if (extras != null) {
23 | upIntent.putExtras(extras);
24 | }
25 | if (NavUtils.shouldUpRecreateTask(activity, upIntent)) {
26 | // This activity is NOT part of this app's task, so create a new task
27 | // when navigating up, with a synthesized back stack.
28 | TaskStackBuilder.create(activity)
29 | // Add all of this activity's parents to the back stack.
30 | .addNextIntentWithParentStack(upIntent)
31 | // Navigate up to the closest parent.
32 | .startActivities();
33 | } else {
34 | // This activity is part of this app's task, so simply
35 | // navigate up to the logical parent activity.
36 | // According to http://stackoverflow.com/a/14792752/2420519
37 | //NavUtils.navigateUpTo(activity, upIntent);
38 | upIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
39 | activity.startActivity(upIntent);
40 | }
41 | }
42 | activity.finish();
43 | }
44 |
45 | public static void navigateUp(Activity activity) {
46 | navigateUp(activity, null);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/sample/src/main/java/me/zhanghai/android/materialedittext/sample/MainActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015 Zhang Hai
3 | * All Rights Reserved.
4 | */
5 |
6 | package me.zhanghai.android.materialedittext.sample;
7 |
8 | import android.content.Intent;
9 | import android.os.Bundle;
10 | import android.support.design.widget.TextInputLayout;
11 | import android.support.v7.app.AppCompatActivity;
12 | import android.view.Menu;
13 | import android.view.MenuItem;
14 | import android.widget.EditText;
15 |
16 | import butterknife.BindView;
17 | import butterknife.ButterKnife;
18 |
19 | public class MainActivity extends AppCompatActivity {
20 |
21 | @BindView(R.id.error_framework_edit)
22 | EditText mErrorFrameworkEdit;
23 | @BindView(R.id.error_material_edit)
24 | EditText mErrorMaterialEdit;
25 | @BindView(R.id.error_edit_layout)
26 | TextInputLayout mErrorEditLayout;
27 |
28 | @Override
29 | protected void onCreate(Bundle savedInstanceState) {
30 | super.onCreate(savedInstanceState);
31 |
32 | setContentView(R.layout.main_activity);
33 | ButterKnife.bind(this);
34 |
35 | mErrorFrameworkEdit.setError("An error occurred");
36 | mErrorMaterialEdit.setError("An error occurred");
37 | mErrorEditLayout.setError("An error occurred");
38 | }
39 |
40 | @Override
41 | public boolean onCreateOptionsMenu(Menu menu) {
42 | getMenuInflater().inflate(R.menu.menu_main, menu);
43 | return true;
44 | }
45 |
46 | @Override
47 | public boolean onOptionsItemSelected(MenuItem item) {
48 | switch (item.getItemId()) {
49 | case R.id.action_about:
50 | startActivity(new Intent(this, AboutActivity.class));
51 | return true;
52 | default:
53 | return super.onOptionsItemSelected(item);
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/sample/src/main/launcher_icon-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanghai/MaterialEditText/d32ca941812972143fb9668b9245a11d87e36527/sample/src/main/launcher_icon-web.png
--------------------------------------------------------------------------------
/sample/src/main/res/layout/about_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
15 |
16 |
25 |
26 |
32 |
33 |
40 |
41 |
48 |
49 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/main_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
15 |
16 |
24 |
25 |
26 |
27 |
32 |
33 |
39 |
40 |
47 |
48 |
55 |
56 |
57 |
58 |
64 |
65 |
71 |
72 |
79 |
80 |
87 |
88 |
89 |
90 |
96 |
97 |
102 |
106 |
107 |
108 |
115 |
119 |
120 |
121 |
126 |
131 |
132 |
133 |
134 |
--------------------------------------------------------------------------------
/sample/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
20 |
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-hdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanghai/MaterialEditText/d32ca941812972143fb9668b9245a11d87e36527/sample/src/main/res/mipmap-hdpi/launcher_icon.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-mdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanghai/MaterialEditText/d32ca941812972143fb9668b9245a11d87e36527/sample/src/main/res/mipmap-mdpi/launcher_icon.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xhdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanghai/MaterialEditText/d32ca941812972143fb9668b9245a11d87e36527/sample/src/main/res/mipmap-xhdpi/launcher_icon.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxhdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanghai/MaterialEditText/d32ca941812972143fb9668b9245a11d87e36527/sample/src/main/res/mipmap-xxhdpi/launcher_icon.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxxhdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanghai/MaterialEditText/d32ca941812972143fb9668b9245a11d87e36527/sample/src/main/res/mipmap-xxxhdpi/launcher_icon.png
--------------------------------------------------------------------------------
/sample/src/main/res/values-sw600dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 | 24dp
10 |
11 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 | #009688
10 | #00796b
11 | #ffd740
12 |
13 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 | 16dp
10 | 16dp
11 | -4dp
12 |
13 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 | MaterialEditText Sample
11 |
12 | Framework EditText
13 | MaterialEditText
14 | MaterialTextInputLayout
15 | Normal
16 | Error
17 | Disabled
18 | About
19 |
20 | About
21 | MaterialEditText
22 | Version %1$s
23 | Zhang Hai 2015–2016
24 | View on GitHub
25 |
26 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
13 |
17 |
18 |
23 |
24 |
--------------------------------------------------------------------------------
/screenshot/materialedittext.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanghai/MaterialEditText/d32ca941812972143fb9668b9245a11d87e36527/screenshot/materialedittext.gif
--------------------------------------------------------------------------------
/screenshot/materialedittext.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanghai/MaterialEditText/d32ca941812972143fb9668b9245a11d87e36527/screenshot/materialedittext.mp4
--------------------------------------------------------------------------------
/screenshot/native-edittext.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanghai/MaterialEditText/d32ca941812972143fb9668b9245a11d87e36527/screenshot/native-edittext.gif
--------------------------------------------------------------------------------
/screenshot/native-edittext.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanghai/MaterialEditText/d32ca941812972143fb9668b9245a11d87e36527/screenshot/native-edittext.mp4
--------------------------------------------------------------------------------
/screenshot/screenshot-raw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanghai/MaterialEditText/d32ca941812972143fb9668b9245a11d87e36527/screenshot/screenshot-raw.png
--------------------------------------------------------------------------------
/screenshot/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhanghai/MaterialEditText/d32ca941812972143fb9668b9245a11d87e36527/screenshot/screenshot.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015 Zhang Hai
3 | * All Rights Reserved.
4 | */
5 |
6 | include ':library', ':sample'
7 |
--------------------------------------------------------------------------------