Android Tips: cut textview to see ‘…’ (ellipsis)

Android tips: cut textview and add ellipsis

Single line

Add android:ellipsize=”end” in the properties of the texview.

If you want your text on one line, add android:singleLine=”true”.

Example:

<TextView
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:text="Text to cut because it is too long"
  android:ellipsize="end"
  android:singleLine="true"
/>

Multi lines

If your textview will be on 2 lines for example, add Continue reading

Solution for the in-app billing tutorial from Google (Android)

Solution for the IInAppBillingService.aidl error in eclipse.

If you try to add the Google library android for the in-app billing, you will have this error: interface IInAppBillingService should be declared in a file called com\android\vending\billing\IInAppBillingService.aidl.

We will see how to solve this issue. Continue reading