Friday, July 19, 2013

Set Custom Image for Listview ScrollBar Android

Set Image for Listview ScrollBar Android
Below the code how to set custom image for listview scrollview .  I hope it will help ful for you.

Listview scroll bar background image
 android:scrollbarTrackVertical="@drawable/scrool_bg"

Scroll Image

         android:scrollbarThumbVertical="@drawable/scroll"

<ListView
        android:id="@+id/item_listView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
         android:scrollbarAlwaysDrawVerticalTrack="true"
         android:scrollbarTrackVertical="@drawable/scrool_bg"
         android:scrollbarThumbVertical="@drawable/scroll"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/progressBar" >

    </ListView>


Thursday, July 18, 2013

Convert Drawable to Bitmap in Android

Convert Drawable to Bitmap  in Android

Convert Drawable to Bitmap
Bitmap drawable= BitmapFactory.decodeResource(getResources(),
                R.drawable.splash_screen_logo);

              logoview_Splashscreen.setImageBitmap(drawable);


Convert Bitmap
Drawable d =new BitmapDrawable(bitmap);




Check out this may be help you

Related Posts Plugin for WordPress, Blogger...