public class

HtcResUtil

extends Object
java.lang.Object
   ↳ com.htc.util.res.HtcResUtil

Class Overview

A convinient class for access resource from other context.

In some case, you may need to get resource from other context which does not belong to the same application as current resource. If you know that resource name then you can use this class to get the object in that resource.

Summary

Public Constructors
HtcResUtil()
Public Methods
static Drawable getBlurWallpaper(Context context, boolean isLandscape)
This method is deprecated. No replacement.
static int getPrivateResID(String res)
This API is used to access the non-public resource in the framework/common control.
static int getResourceIdFromContext(Context context, String name, String type)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public HtcResUtil ()

Since: API Level 2.0

Public Methods

public static Drawable getBlurWallpaper (Context context, boolean isLandscape)

Since: API Level 2.0

This method is deprecated.
No replacement.

get get blur wallpaper

Parameters
context the context
isLandscape true or false
Returns
  • the wallpaper with blur effect

public static int getPrivateResID (String res)

Since: API Level 2.2

This API is used to access the non-public resource in the framework/common control. The usage MUST do the error handling. The usage MUST do the performance problem of the java class reflection

Parameters
res The string format of the resource id that you want
Returns
  • the resource id that you want. return 0 if there are any exception/error/problem.

public static int getResourceIdFromContext (Context context, String name, String type)

Since: API Level 2.0