Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.Context; import android.preference.PreferenceManager; public class Main { private static void setKeyboardPortraitHeight(Context context, int height) { PreferenceManager.getDefaultSharedPreferences(context).edit().putInt("keyboard_height_portrait", height) .apply(); } }