Blinking Text in android view

Actually there is an Easter egg blink tag for this in ICS! 🙂 I don’t actually recommend using it – was REALLY amused to find it in the source, though! <blink xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”wrap_content” android:layout_height=”wrap_content”> <TextView android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:text=”I’m blinking” /> </blink>

how to get text from textview

I haven’t tested this – but it should give you a general idea of the direction you need to take. For this to work, I’m going to assume a few things about the text of the TextView: The TextView consists of lines delimited with “\n”. The first line will not include an operator (+, -, … Read more

Android – Expandable TextView with Animation

You can check my blog post on ExpandableTexTView: The idea is, initially the TextView will show a small portion of a long text and when it is clicked, it will show the rest of the text. So here is the code that how I solved it. package com.rokonoid.widget; import android.content.Context; import android.content.res.TypedArray; import android.text.SpannableStringBuilder; import … Read more

Android text view color doesn’t change when disabled

I think what’s happening is that since you’re overriding the default textcolor it isn’t inheriting the other textcolor styles. Try creating a ColorStateList for it and setting the textColor attribute to it instead of to a color. In a color file (eg res/color/example.xml): <?xml version=”1.0″ encoding=”utf-8″?> <selector xmlns:android=”http://schemas.android.com/apk/res/android”> <item android:state_enabled=”false” android:color=”@color/disabled_color” /> <item android:color=”@color/normal_color”/> </selector> … Read more

How to set a ripple effect on textview or imageview on Android?

Ref : http://developer.android.com/training/material/animations.html, http://wiki.workassis.com/category/android/android-xml/ <TextView . . android:background=”?attr/selectableItemBackgroundBorderless” android:clickable=”true” /> <ImageView . . . android:background=”?attr/selectableItemBackgroundBorderless” android:clickable=”true” />

Rounded corner for textview in android

Create rounded_corner.xml in the drawable folder and add the following content, <?xml version=”1.0″ encoding=”utf-8″?> <shape xmlns:android=”http://schemas.android.com/apk/res/android” > <stroke android:width=”1dp” android:color=”@color/common_border_color” /> <solid android:color=”#ffffff” /> <padding android:left=”1dp” android:right=”1dp” android:bottom=”1dp” android:top=”1dp” /> <corners android:radius=”5dp” /> </shape> Set this drawable in the TextView background property like so: android:background=”@drawable/rounded_corner” I hope this is useful for you.