public class

HtcSkinUtil

extends Object
java.lang.Object
   ↳ com.htc.util.skin.HtcSkinUtil

Class Overview

A class for apply skin configuration and get skin package information.

Summary

Constants
int PREVIEW_LAND This constant is deprecated. No replacement.
int PREVIEW_PORT This constant is deprecated. No replacement.
Public Constructors
HtcSkinUtil()
Public Methods
static int getColorResIdentifier(Context context, String resName, int defRes)
Retrieves the resource identifier for Color resource resName
static int getCurrentTheme(Context context)
Retrieves the theme id that application context should apply
static int getDrawableResIdentifier(Context context, String resName, int defRes)
Retrieves the resource identifier for Drawable resource resName
static int getIntegerResIdentifier(Context context, String resName, int defRes)
Retrieves the resource identifier for Integer resource resName
static int getSkinVersionCode(Context context)
This method is deprecated. Use getSkinVersionCode() instead
static int getSkinVersionCode()
Gets the version of the skin package by a given package name.
static void syncBoth(Context context)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int PREVIEW_LAND

Since: API Level 2.0

This constant is deprecated.
No replacement.

Constant Value: 1 (0x00000001)

public static final int PREVIEW_PORT

Since: API Level 2.0

This constant is deprecated.
No replacement.

Constant Value: 0 (0x00000000)

Public Constructors

public HtcSkinUtil ()

Since: API Level 2.0

Public Methods

public static int getColorResIdentifier (Context context, String resName, int defRes)

Since: API Level 2.0

Retrieves the resource identifier for Color resource resName

Parameters
context Context for your Activity.
resName The name of the resource you want to retrieve in the skin package.
defRes The default resource ID. MUST NOT be null.
Returns
  • The resource ID for the Color resource. If the resource doesn't exist in current skin package, defRes will be returned.

public static int getCurrentTheme (Context context)

Since: API Level 2.0

Retrieves the theme id that application context should apply

Parameters
context Context for your Activity
Returns
  • Theme id for current skin

public static int getDrawableResIdentifier (Context context, String resName, int defRes)

Since: API Level 2.0

Retrieves the resource identifier for Drawable resource resName

Parameters
context Context for your Activity.
resName The name of the resource you want to retrieve in the skin package.
defRes The default resource ID. MUST NOT be null.
Returns
  • The resource ID for the Drawable resource. If the resource doesn't exist in current skin package, defRes will be returned.

public static int getIntegerResIdentifier (Context context, String resName, int defRes)

Since: API Level 2.0

Retrieves the resource identifier for Integer resource resName

Parameters
context Context for your Activity.
resName The name of the resource you want to retrieve in the skin package.
defRes The default resource ID. MUST NOT be null.
Returns
  • The resource ID for the Integer resource. If the resource doesn't exist in current skin package, defRes will be returned.

public static int getSkinVersionCode (Context context)

Since: API Level 2.0

This method is deprecated.
Use getSkinVersionCode() instead

Gets the version of the skin package by a given package name.

Parameters
context The Context of the application
Returns
  • Version of the skin.

public static int getSkinVersionCode ()

Since: API Level 2.0

Gets the version of the skin package by a given package name.

Returns
  • Version of the skin.

public static void syncBoth (Context context)

Since: API Level 2.0