kandi background
Explore Kits

anytextview | An extension of Android 's TextView , EditText and Button | Android library

 by   hanspeide Java Version: v1.2 License: No License

 by   hanspeide Java Version: v1.2 License: No License

Download this library from

kandi X-RAY | anytextview Summary

anytextview is a Java library typically used in Mobile, Android applications. anytextview has no bugs, it has no vulnerabilities, it has build file available and it has low support. You can download it from GitHub, Maven.
Note: AnyTextView is no longer being maintained. I recommend replacing AnyTextView with the Calligraphy library instead. Frustration arise the moment you realise that you cannot set a custom font on TextView, EditText and Button views using the android:typeface XML-attribute. AnyTextView is here to relieve your pain.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • anytextview has a low active ecosystem.
  • It has 167 star(s) with 40 fork(s). There are 10 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 0 open issues and 5 have been closed. On average issues are closed in 11 days. There are no pull requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of anytextview is v1.2
anytextview Support
Best in #Android
Average in #Android
anytextview Support
Best in #Android
Average in #Android

quality kandi Quality

  • anytextview has 0 bugs and 0 code smells.
anytextview Quality
Best in #Android
Average in #Android
anytextview Quality
Best in #Android
Average in #Android

securitySecurity

  • anytextview has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • anytextview code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
anytextview Security
Best in #Android
Average in #Android
anytextview Security
Best in #Android
Average in #Android

license License

  • anytextview does not have a standard license declared.
  • Check the repository for any license declaration and review the terms closely.
  • Without a license, all rights are reserved, and you cannot use the library in your applications.
anytextview License
Best in #Android
Average in #Android
anytextview License
Best in #Android
Average in #Android

buildReuse

  • anytextview releases are available to install and integrate.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions, examples and code snippets are available.
  • It has 352 lines of code, 11 functions and 12 files.
  • It has low code complexity. Code complexity directly impacts maintainability of the code.
anytextview Reuse
Best in #Android
Average in #Android
anytextview Reuse
Best in #Android
Average in #Android
Top functions reviewed by kandi - BETA

kandi has reviewed anytextview and discovered the below as its top functions. This is intended to give you an instant insight into anytextview implemented functionality, and help decide if they suit your requirements.

  • Sets the typeface of a text view .
  • Sets the content to be saved .

anytextview Key Features

An extension of Android's TextView, EditText and Button that let's you use the font of your choice

Setup

copy iconCopydownload iconDownload
dependencies {
    compile 'com.ctrlplusz.anytextview:library:1.2'
}

How to use:

copy iconCopydownload iconDownload
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:foobar="http://schemas.android.com/apk/res-auto"
		.. >

License

copy iconCopydownload iconDownload
Copyright 2015 Hans Petter Eide

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.

How to adjust horizontal views in layout

copy iconCopydownload iconDownload
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="100dp"
    android:orientation="vertical">

    <TextView
        android:id="@+id/a"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/blue"
        android:textColor="@android:color/white"
        android:text="hi dear"
        android:layout_toLeftOf="@+id/b"/>

    <TextView
        android:id="@+id/b"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:background="@color/black"
        android:textColor="@android:color/white"
        android:text="hello world"
        android:layout_toLeftOf="@+id/c"/>

    <TextView
        android:id="@+id/c"
        android:layout_width="100dp"
        android:layout_height="match_parent"
        android:layout_alignParentRight="true"
        android:textColor="@android:color/white"
        android:text="hi darling"
        android:background="@color/green"/>

</RelativeLayout>
-----------------------
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="100dp"
android:orientation="vertical">

<TextView
    android:id="@+id/a"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:background="@color/blue"
    android:textColor="@android:color/white"
    android:text="hi dear"
    />

<TextView
    android:id="@+id/b"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:background="@color/black"
    android:textColor="@android:color/white"
    android:text="hello world"
    android:layout_toRightOf="@+id/a"
    android:layout_toLeftOf="@+id/c"/>

<TextView
    android:id="@+id/c"
    android:layout_width="100dp"
    android:layout_height="match_parent"
    android:layout_alignParentRight="true"
    android:textColor="@android:color/white"
    android:text="hi darling"
    android:background="@color/green"/>

</RelativeLayout>

Community Discussions

Trending Discussions on anytextview
  • How to adjust horizontal views in layout
Trending Discussions on anytextview

QUESTION

How to adjust horizontal views in layout

Asked 2017-Jan-04 at 21:18

I am trying to adjust the sizes of my textviews based on the size of the device. However it's partial adjustments. Let me show you what i mean: enter image description here

The following picture depicts the desired effect. TextView B length determines the length of textview A, that is to say that part C is completely independent and is at the end with fixed size. If the textview A gets it's size reduced,then the end is elipsized. I have tried shifting from using LinearLayout with weights as well as RelativeLayout but haven't achieved the desired effect. Thoughts?

What i have tried:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:foobar="http://schemas.android.com/apk/res-auto"
    android:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="50dp"
    android:paddingBottom="3dp"
    android:paddingTop="3dp">

    <com.android.volley.toolbox.NetworkImageView
        android:id="@+id/thumbnail"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:background="#ddd"
        android:scaleType="centerCrop"
        android:visibility="invisible" />

    <RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <com.ctrlplusz.anytextview.AnyTextView
            android:id="@+id/tv2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_centerVertical="true"
            android:layout_toLeftOf="@+id/input"
            android:ellipsize="end"
            android:maxLength="20"
            android:maxLines="1"
            android:paddingLeft="7dp"
            android:singleLine="true"
            android:text="cshbcadhbhjvbbvjfbvcsdhabcsdjbvjsdbvjsfdbvsfnvk"
            android:textColor="@color/black"
            android:textSize="20dp"
            foobar:typeface="Roboto-Light.ttf" />
        <!--android:text="cshbcadhbhjvbbvjfbvcsdhabcsdjbvjsdbvjsfdbvsfnvk"-->
        <RelativeLayout
            android:id="@+id/input"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:layout_gravity="center_vertical">

            <com.ctrlplusz.anytextview.AnyTextView
                android:id="@+id/price"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_toLeftOf="@+id/toggle"
                android:gravity="end"
                android:paddingRight="4dp"
                android:text="3900"
                android:textColor="@color/gray"
                android:textSize="20dp"
                foobar:typeface="Roboto-Light.ttf" />

            <RelativeLayout
                android:id="@+id/toggle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_marginRight="5dp"
                android:gravity="end"
                android:orientation="horizontal">

                <RelativeLayout
                    android:id="@+id/minus"
                    android:layout_width="38dp"
                    android:layout_height="35dp"
                    android:layout_centerVertical="true"
                    android:background="@drawable/minus_product_icon">

                    <ImageView
                        android:layout_width="20dp"
                        android:layout_height="20dp"
                        android:layout_centerHorizontal="true"
                        android:layout_centerVertical="true"
                        android:src="@drawable/ic_minus" />
                </RelativeLayout>


                <RelativeLayout
                    android:id="@+id/add"
                    android:layout_width="38dp"
                    android:layout_height="35dp"
                    android:layout_centerVertical="true"
                    android:layout_toRightOf="@+id/num"
                    android:background="@drawable/add_product_icon">

                    <ImageView
                        android:layout_width="20dp"
                        android:layout_height="20dp"
                        android:layout_centerHorizontal="true"
                        android:layout_centerVertical="true"
                        android:src="@drawable/ic_add_icon" />
                </RelativeLayout>

                <EditText
                    android:id="@+id/num"
                    android:layout_width="40dp"
                    android:layout_height="35dp"
                    android:layout_centerVertical="true"
                    android:layout_toRightOf="@+id/minus"
                    android:background="@drawable/product_custom_edit_text"
                    android:digits="1234567890"
                    android:focusable="true"
                    android:focusableInTouchMode="true"
                    android:gravity="center"
                    android:imeOptions="actionDone"
                    android:inputType="numberDecimal"
                    android:padding="2dp"
                    android:singleLine="true"
                    android:text="0"
                    android:textColor="#000"
                    android:textCursorDrawable="@drawable/mycursor" />

            </RelativeLayout>

        </RelativeLayout>
    </RelativeLayout>


    <com.ctrlplusz.anytextview.AnyTextView
        android:id="@+id/p"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_centerVertical="true"
        android:layout_gravity="center_vertical"
        android:layout_marginLeft="11dp"
        android:textColor="@color/gray"
        android:textSize="20dp"
        foobar:typeface="Roboto-Light.ttf" />

</RelativeLayout>

ANSWER

Answered 2017-Jan-04 at 14:45

Something like this?

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="100dp"
    android:orientation="vertical">

    <TextView
        android:id="@+id/a"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/blue"
        android:textColor="@android:color/white"
        android:text="hi dear"
        android:layout_toLeftOf="@+id/b"/>

    <TextView
        android:id="@+id/b"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:background="@color/black"
        android:textColor="@android:color/white"
        android:text="hello world"
        android:layout_toLeftOf="@+id/c"/>

    <TextView
        android:id="@+id/c"
        android:layout_width="100dp"
        android:layout_height="match_parent"
        android:layout_alignParentRight="true"
        android:textColor="@android:color/white"
        android:text="hi darling"
        android:background="@color/green"/>

</RelativeLayout>

Source https://stackoverflow.com/questions/41465901

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install anytextview

If you're using Gradle (recommended), add the following to your build.gradle file:.

Support

For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.