TextView Ellipsize (…) not working

Add the following styles in your styles file (typically styles.xml): <style name=”autoscroll”> <item name=”android:singleLine”>true</item> <item name=”android:ellipsize”>marquee</item> <item name=”android:marqueeRepeatLimit”>marquee_forever</item> <item name=”android:focusable”>true</item> <item name=”android:focusableInTouchMode”>true</item> <item name=”android:scrollHorizontally”>true</item> </style> Then add the style @style/autoscroll to your TextView: <TextView android:id=”@+id/lName” style=”@style/autoscroll” /> You can reuse your autoscroll feature easily when you want this way.

Add custom font for complete android application

I figured it out by my self. This is the code I used. I create custom TextView which has custom font as default font. public class MyTextView extends TextView { public MyTextView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(); } public MyTextView(Context context, AttributeSet attrs) { super(context, attrs); init(); } public MyTextView(Context … Read more

Android OS bug with some devices running Jelly Bean/4.2.1 – TextView.setError(CharSequence error) Missing icon

Temporary Solution! EditTextErrorFixed.java While this is indeed an SDK bug, I’ve managed to use reflection methods to get the icon to work as intended. I checked that it works with both 4.2 and 4.2.1 and verified that it works on my updated Galaxy Nexus. The source can be found here. The screenshot shows that the … Read more

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>

android ClickableSpan intercepts the click event

I’ve also run into this problem, and thanks to the source code @KMDev mentioned, I’ve came up with a much cleaner approach. First, since I’m only having a TextView that is to be made partially clickable, in fact I don’t need most of the functionalities LinkMovementMethod (and its super class ScrollingMovementMethod) which adds ability to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)