Android

Set ImageView width and height programmatically?

Posted on

To set ImageView width and height programmatically imageview.getLayoutParams().height = 20; here imageview is instance of ImageView. Important: If you’re setting the height after the layout has already been ‘laid out’, then make sure you call imageview.requestLayout() Here is the ref link, credits to Hakem Zaied Hope this helps.

Android

Android Hamburger button icons

Posted on

Hi Guys, I see in Facebook or LinkedIn app, these kind of images with three short horizontal lines at the right end to display side menu. When i search for these images, I found these are called as Hamburger images here. And thought to share these icons, to download. I created this icons using Android Asset Studio from this image. […]

Android

Auto logout after payment done on Paypal android

Posted on

Hi Guys, While working on Paypal Android Sdk 2.3.5v, integration in to an app. I’ve come across a situation, that app should log out from Paypal screens, after payment is done and return to app screens. Here is the code snippet to implement that feature private static PayPalConfiguration config = new PayPalConfiguration() .environment(CONFIG_ENVIRONMENT) .clientId(CONFIG_CLIENT_ID) .rememberUser(false) […]

Android

Get resource Id of Image in drawable folder

Posted on

Image in drawable folder Hi Guys, At times we need to get  resource id of Image in drawable folder to dynamically assign the resource Id to Imageview… here is code snippet to get resource Id of image.. public int getImageResourceID(Context context, String imageName) { int resId = context.getResources().getIdentifier(imageName, “drawable”, “com.mypackage.namehere”); return resId; } hope it helps somebody

Android

Display Animated Gif Image, Android

Posted on

Recently, I’ve worked displaying Animated Gif Image as while loading some network stuff in app screen. Solution for displaying the Animated gif image After some struggle for it, I finally happen to use Webview for displaying the Animated gif image which worked as required. Here is simple code snippet I place this WebView in a RelativeLayout <WebView […]

Android

HTML Tags Supported By TextView, Android

Posted on

Following are the Supported HTML Tags by TextView <a href=”…”> <b> <big> <blockquote> <br> <cite> <dfn> <div align=”…”> <em> <font size=”…” color=”…” face=”…”> <h1> <h2> <h3> <h4> <h5> <h6> <i> <img src=”…”> <p> <small> <strike> <strong> <sub> <sup> <tt> <u> ref link.