Skip to content

Commit 8323bbd

Browse files
committed
init first android-prefix-edittext-textview
0 parents  commit 8323bbd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1286
-0
lines changed

.gitignore

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Built application files
2+
*.apk
3+
*.ap_
4+
*.aab
5+
6+
# Files for the ART/Dalvik VM
7+
*.dex
8+
9+
# Java class files
10+
*.class
11+
12+
# Generated files
13+
bin/
14+
gen/
15+
out/
16+
17+
# Gradle files
18+
.gradle/
19+
build/
20+
21+
# Local configuration file (sdk path, etc)
22+
local.properties
23+
24+
# Proguard folder generated by Eclipse
25+
proguard/
26+
27+
# Log Files
28+
*.log
29+
30+
# Android Studio Navigation editor temp files
31+
.navigation/
32+
33+
# Android Studio captures folder
34+
captures/
35+
36+
# IntelliJ
37+
*.iml
38+
.idea/workspace.xml
39+
.idea/tasks.xml
40+
.idea/gradle.xml
41+
.idea/assetWizardSettings.xml
42+
.idea/dictionaries
43+
.idea/libraries
44+
.idea/caches
45+
# Android Studio 3 in .gitignore file.
46+
.idea/caches/build_file_checksums.ser
47+
.idea/modules.xml
48+
49+
# Keystore files
50+
# Uncomment the following lines if you do not want to check your keystore files in.
51+
#*.jks
52+
#*.keystore
53+
54+
# External native build folder generated in Android Studio 2.2 and later
55+
.externalNativeBuild
56+
57+
# Google Services (e.g. APIs or Firebase)
58+
# google-services.json
59+
60+
# Freeline
61+
freeline.py
62+
freeline/
63+
freeline_project_description.json
64+
65+
# fastlane
66+
fastlane/report.xml
67+
fastlane/Preview.html
68+
fastlane/screenshots
69+
fastlane/test_output
70+
fastlane/readme.md
71+
72+
# Version control
73+
vcs.xml
74+
75+
# lint
76+
lint/intermediates/
77+
lint/generated/
78+
lint/outputs/
79+
lint/tmp/
80+
# lint/reports/
81+
82+
# Built application files
83+
/*/build/
84+
85+
# Crashlytics configuations
86+
com_crashlytics_export_strings.xml
87+
88+
# Local configuration file (sdk path, etc)
89+
local.properties
90+
91+
# Gradle generated files
92+
.gradle/
93+
94+
# Signing files
95+
.signing/
96+
97+
# User-specific configurations
98+
.idea/libraries/
99+
.idea/workspace.xml
100+
.idea/tasks.xml
101+
.idea/.name
102+
.idea/compiler.xml
103+
.idea/copyright/profiles_settings.xml
104+
.idea/encodings.xml
105+
.idea/misc.xml
106+
.idea/modules.xml
107+
.idea/scopes/scope_settings.xml
108+
.idea/vcs.xml
109+
*.iml
110+
111+
# OS-specific files
112+
.DS_Store
113+
.DS_Store?
114+
._*
115+
.Spotlight-V100
116+
.Trashes
117+
ehthumbs.db
118+
Thumbs.db

.idea/codeStyles/Project.xml

Lines changed: 116 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
2+
# android-prefix-textView and editView
3+
EditText and TextView with support for non editable prefix and image.
4+
5+
## Howto?
6+
Either directly via xml:
7+
```xml
8+
<com.maze.prefix.PrefixView
9+
android:layout_margin="5dp"
10+
android:id="@+id/textview3"
11+
android:layout_width="match_parent"
12+
android:layout_height="wrap_content"
13+
android:background="#1111"
14+
android:gravity="right|center_vertical"
15+
android:text="1398/09/23"
16+
android:textColorHint="#567"
17+
android:textSize="18sp"
18+
app:prefix=" تاریخ عضویت: "
19+
android:textColor="#D500F9"
20+
app:res="@drawable/term" />
21+
```
22+
23+
or programmatically in code:
24+
25+
```kotlin
26+
27+
### Setting the prefix
28+
edit_text.prefix = "$"
29+
30+
### Setting the color
31+
edit_text.setHintTextColor(Color.GREEN)
32+
33+
### Setting the drawable
34+
edit_text.drawable = avatar
35+
36+
```
37+
See [sample code]
38+
39+
## Add as Library
40+
Step 1. Add the JitPack repository to your build file
41+
Add it in your root build.gradle at the end of repositories:
42+
```
43+
allprojects {
44+
repositories {
45+
...
46+
maven { url 'https://jitpack.io' }
47+
}
48+
}
49+
```
50+
Step 2. Add the dependency
51+
```
52+
dependencies {
53+
implementation 'com.github.maze:android-prefix-edittext-textview:lastversion'
54+
}
55+
```
56+

build.gradle

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
buildscript {
2+
ext.kotlin_version = '1.3.41'
3+
repositories {
4+
google()
5+
jcenter()
6+
}
7+
dependencies {
8+
classpath 'com.android.tools.build:gradle:3.5.0'
9+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
10+
}
11+
}
12+
13+
allprojects {
14+
repositories {
15+
google()
16+
jcenter()
17+
}
18+
}
19+
20+
task clean(type: Delete) {
21+
delete rootProject.buildDir
22+
}

gradle.properties

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Project-wide Gradle settings.
2+
# IDE (e.g. Android Studio) users:
3+
# Gradle settings configured through the IDE *will override*
4+
# any settings specified in this file.
5+
# For more details on how to configure your build environment visit
6+
# http://www.gradle.org/docs/current/userguide/build_environment.html
7+
# Specifies the JVM arguments used for the daemon process.
8+
# The setting is particularly useful for tweaking memory settings.
9+
android.enableJetifier=true
10+
android.useAndroidX=true
11+
org.gradle.jvmargs=-Xmx1536m
12+
# When configured, Gradle will run in incubating parallel mode.
13+
# This option should only be used with decoupled projects. More details, visit
14+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
15+
# org.gradle.parallel=true

gradle/wrapper/gradle-wrapper.jar

53.4 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Sun Sep 29 11:01:27 IRST 2019
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

0 commit comments

Comments
 (0)