Deprecated
in API level 37
Class Overview
This class provides to set device font size
Specific Policy
Summary
Public Constructors |
|
Font()
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Constants
public
static
final
String
CONTENT_URI_STRING
Since: API level 34
Constant Value:
"content://com.samsung.android.knox.sdk/config/font"
public
static
final
String
ID
Since: API level 34
public
static
final
String
KEY_SYSTEM_ACTIVE_FONT_SIZE
Since: API level 34
Deprecated
in API level 37
API to set the font size on the device
    Param
Usage
Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/config/font");
ContentValues contentValues = new ContentValues();
contentValues.put("system-active-font-size", "1.0");
String selection = "key=?";
String[] selectionArgs = new String[] {"system-active-font-size"};
mContext.getContentResolver().update(uri, contentValues, selection, selectionArgs);
Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/config/font");
String selection = "key=?";
String[] selectionArgs = new String[] {"system-active-font-size"};
Cursor cursor = mContext.getContentResolver().query(uri, null, selection, selectionArgs, null);
float systemActiveFontSize = -1.f;
if (cursor != null) {
cursor.moveToFirst();
systemActiveFontSize = cursor.getFloat(0);
}
|
Permission
The use of this feature requires the caller to have the
"com.samsung.android.knox.permission.KNOX_NDA_DEVICE_SETTINGS_RT" permission.
|
Constant Value:
"system-active-font-size"
public
static
final
String
KEY_SYSTEM_FONT_SIZES
Since: API level 34
Deprecated
in API level 37
API to get the supported font sizes on the device.
Usage
Uri uri = Uri.parse("content://com.samsung.android.knox.sdk/config/font");
String selection = "key=?";
String[] selectionArgs = new String[] {"system-font-sizes"};
Cursor cursor = mContext.getContentResolver().query(uri, null, selection, selectionArgs, null);
ArrayList<Float> fontSizes = new ArrayList<>();
if (cursor != null) {
cursor.moveToFirst();
do {
fontSizes.add(cursor.getFloat(0));
} while (cursor.moveToNext());
}
|
Permission
The use of this feature requires the caller to have the
"com.samsung.android.knox.permission.KNOX_NDA_DEVICE_SETTINGS_RT" permission.
|
Constant Value:
"system-font-sizes"
public
static
final
String
PARAM_SYSTEM_ACTIVE_FONT_SIZE
Since: API level 34
Constant Value:
"system-active-font-size"
Public Constructors