Nice sliding menu with unique color fade effect by Romain Guy

May 27, 2013 by

This nice sliding menu is supported in its full glory with API level 14. But can be degraded gracefully on earlier version of the OS too.

Tip from Romain:  use the drawing cache instead with View.setDrawingCacheEnabled.

read more

Related Posts

Share This

A useful tool to work with Android APKs

May 23, 2013 by

Here’s a nice project to be able to work with Android APK resources:

https://code.google.com/p/android-apktool/

read more

Using Jackson JSON Parser in Android Project

Mar 1, 2013 by

After some research around JSON libraries I reached conclusion that Jackson would be the first choice, both because it is much more used then Gson and it seems to have performance edge over Gson as well. Unfortunately though, adding just the core and the databind jars, without using ProGuard inflates the size of the final APK by a whooping 600Kb.

read more

Android ICS style buttons for a dialog

Jan 27, 2013 by

This is basically how you create a standart borderless buttons, like the Android ICS ones.


<!-- OK/Cancel buttons.  -->
<LinearLayout
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
       android:orientation="vertical"
       android:divider="?android:attr/dividerHorizontal"
       android:showDividers="beginning"
       android:paddingTop="16dip">

    <LinearLayout
           style="?android:attr/buttonBarStyle"
           android:layout_width="match_parent"
           android:layout_height="wrap_content"
           android:orientation="horizontal"
           android:measureWithLargestChild="true">

        <LinearLayout android:id="@+id/leftSpacer"
               android:layout_weight="0.25"
               android:layout_width="0dip"
               android:layout_height="wrap_content"
               android:orientation="horizontal"
               android:visibility="gone" />

        <Button android:id="@+id/cancel_button"
               android:layout_width="0dip"
               android:layout_height="wrap_content"
               android:layout_gravity="left"
               android:layout_weight="1"
               android:text="@string/cancel"
               android:maxLines="2"
               style="?android:attr/buttonBarButtonStyle" />

        <Button android:id="@+id/ok_button"
               android:layout_width="0dip"
               android:layout_height="wrap_content"
               android:layout_gravity="right"
               android:layout_weight="1"
               android:text="@string/install"
               android:maxLines="2"
               android:filterTouchesWhenObscured="true"
               style="?android:attr/buttonBarButtonStyle" />

        <LinearLayout android:id="@+id/rightSpacer"
               android:layout_width="0dip"
               android:layout_weight="0.25"
               android:layout_height="wrap_content"
               android:orientation="horizontal"
               android:visibility="gone" />

    </LinearLayout>
</LinearLayout>
read more

ProGuard – keep entire package (different variations)

Nov 1, 2012 by

Keeps the names of all public classes in the specified package:


-keep public class com.myapp.customcomponents.*

The following configuration keeps the names of all public classes in the specified package and its subpackages:


-keep public class com.myapp.customcomponents.**

The following configuration keeps the names of all public/protected classes/fields/methods in the specified package and its subpackages:


-keep public class com.myapp.customcomponents.** {
  public protected *;
}
read more