Skip to content

Commit

Permalink
Text autorités when a lot of numbers are inputed.
Browse files Browse the repository at this point in the history
Issue #5.
  • Loading branch information
Stéphane Baiget committed Mar 31, 2017
1 parent f108f61 commit f967f48
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
4 changes: 4 additions & 0 deletions dependencies.gradle
Expand Up @@ -21,12 +21,14 @@ ext {
rxAndroidVersion = "2.0.1"
butterknifeVersion = "8.5.1"
rangeViewVersion = "0.1.1"
autoFitTextViewVersion = "0.2.1"

// Packages
supportPackage = 'com.android.support'
reactivePackage = 'io.reactivex.rxjava2'
jakeWhartonPackage = 'com.jakewharton'
rangeViewPackage = 'me.bendik.simplerangeview'
autoFitTextViewPackage = "me.grantland"

supportDependencies = [
appCompat : buildDependency(supportPackage, 'appcompat-v7', supportVersion),
Expand All @@ -50,6 +52,8 @@ ext {
]

rangeView = buildDependency(rangeViewPackage, 'simplerangeview', rangeViewVersion)

autoFitTextView = buildDependency(autoFitTextViewPackage, 'autofittextview', autoFitTextViewVersion)
}

static String buildDependency(String pack, String dependency, String version) {
Expand Down
1 change: 1 addition & 0 deletions library/build.gradle
Expand Up @@ -36,4 +36,5 @@ dependencies {
compile supportDependencies.appCompat
compile supportDependencies.percent
compile supportDependencies.grid
compile autoFitTextView
}
7 changes: 4 additions & 3 deletions library/src/main/res/layout/snp_dialog_decimal_picker.xml
Expand Up @@ -27,20 +27,21 @@

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="92dp"
android:gravity="center_vertical"
android:orientation="horizontal"
>

<TextView
<me.grantland.widget.AutofitTextView
android:id="@+id/tv_hex_number"
style="@style/Number"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:maxLines="1"
android:padding="@dimen/snp_margin_padding_size_medium"
app:minTextSize="14sp"
tools:text="123458"
/>

Expand Down
9 changes: 5 additions & 4 deletions library/src/main/res/layout/snp_dialog_hexadecimal_picker.xml
Expand Up @@ -27,21 +27,22 @@

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="92dp"
android:gravity="center_vertical"
android:orientation="horizontal"
>

<TextView
<me.grantland.widget.AutofitTextView
android:id="@+id/tv_hex_number"
style="@style/Number"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:maxLines="1"
android:padding="@dimen/snp_margin_padding_size_medium"
app:minTextSize="14sp"
tools:text="8B56E4FE"
android:maxLines="1"
/>

<ImageButton
Expand Down

0 comments on commit f967f48

Please sign in to comment.