Where can i get BigClip? [closed]

The code of BigClip is shown on my answer to this question. It is necessary to compile it for your own use. There is no pre-built Jar you can add to the class-path. (OK, there is a pre-built Jar, but not that I am offering for others to use – brew your own).

How to compare dates in Java?

Date has before and after methods and can be compared to each other as follows: For an inclusive comparison: You could also give Joda-Time a go, but note that: Joda-Time is the de facto standard date and time library for Java prior to Java SE 8. Users are now asked to migrate to java.time (JSR-310). Back-ports are available for Java 6 and 7 as well as Android.

Android ListView headers

Here’s how I do it, the keys are getItemViewType and getViewTypeCount in the Adapter class. getViewTypeCount returns how many types of items we have in the list, in this case we have a header item and an event item, so two. getItemViewType should return what type of View we have at the input position. Android will then take care of passing you the right type of View in convertView automatically. Here what …

Read more

What is the difference between String.subString() and String.subSequence()

Using str.subSequence(begin, end) returns a CharSequence which is a read-only form of the string represented as a sequence of chars. For example: It’s read only in the sense that you can’t change the chars within the CharSequence without instantiating a new instance of a CharSequence. If you have to use str.subSequence(begin, end), you can cast the result to a String: and use all the normal String operators like subSequence …

Read more

Java way to check if a string is palindrome

Using reverse is overkill because you don’t need to generate an extra string, you just need to query the existing one. The following example checks the first and last characters are the same, and then walks further inside the string checking the results each time. It returns as soon as s is not a palindrome. The problem with the reverse approach …

Read more