本文整理汇总了Java中com.orhanobut.hawk.Hawk.get方法的典型用法代码示例。如果您正苦于以下问题:Java Hawk.get方法的具体用法?Java Hawk.get怎么用?Java Hawk.get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.orhanobut.hawk.Hawk
的用法示例。
在下文中一共展示了Hawk.get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fillData
import com.orhanobut.hawk.Hawk; //导入方法依赖的package包/类
private void fillData() {
name1 = Hawk.get(Constant.NAME1, null);
name2 = Hawk.get(Constant.NAME2, null);
runOnUiThread(new Runnable() {
@Override
public void run() {
dialog.dismiss();
layoutName = Hawk.get(Constant.LAYOUT, "五格起名");
tv_name1.setText(String.valueOf(name1));
tv_name2.setText(String.valueOf(name2));
tvLayoutName.setText(String.valueOf(layoutName));
}
});
}
示例2: bindEvenListener
import com.orhanobut.hawk.Hawk; //导入方法依赖的package包/类
@Override
protected void bindEvenListener(Bundle savedInstanceState) {
supportUI();
super.bindEvenListener(savedInstanceState);
LocaleUtils.loadLocale(this);
FragmentMaster fragmentMaster = getFragmentMaster();
fragmentMaster.registerFragmentLifecycleCallbacks(mLifecycleCallbacks);
fragmentMaster.install(R.id.container, new Request(NavigationFragment.class));
int flag = CalendarUtils.festivalFlag();
if (2 == flag) {
ViewStub viewStub = findViewById(R.id.view_stub);
if (null != viewStub) {
viewStub.inflate();
}
}
if (Hawk.get("WHATS_NEW_VERSION", -1) != BuildConfig.VERSION_CODE) {
new ChangelogBottomSheetDialog().show(getSupportFragmentManager(), "ChangelogBottomSheetDialog");
}
}
示例3: onCreate
import com.orhanobut.hawk.Hawk; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Hawk.init(this).build();
SQLiteDatabase.loadLibs(this);
int times = Hawk.get(PREF_TIMES, 0) + 1;
Log.d(TAG, "Psss! Let me tell a secret: you opened this app " + times + " times.");
Hawk.put(PREF_TIMES, times);
}
示例4: getAllCachedCoinNames
import com.orhanobut.hawk.Hawk; //导入方法依赖的package包/类
public ArrayList<String> getAllCachedCoinNames() {
if (allCachedCoinNames.size() == 0) {
allCachedCoinNames = Hawk.get(ALL_COIN_NAMES_LIST,
new ArrayList<String>());
}
return allCachedCoinNames;
}
示例5: updateTheme
import com.orhanobut.hawk.Hawk; //导入方法依赖的package包/类
public void updateTheme(){
this.primaryColor = Hawk.get(context.getString(R.string.preference_primary_color),
getColor(R.color.md_indigo_500));
this.accentColor = Hawk.get(context.getString(R.string.preference_accent_color),
getColor(R.color.md_light_blue_500));
baseTheme = Theme.fromValue(Hawk.get(context.getString(R.string.preference_base_theme), 1));
}
示例6: getCoinName
import com.orhanobut.hawk.Hawk; //导入方法依赖的package包/类
public String getCoinName(String symbol) {
String coinName = null;
if (Hawk.contains(symbol)) {
coinName = Hawk.get(symbol);
}
return coinName;
}
示例7: deleteCoinFromList
import com.orhanobut.hawk.Hawk; //导入方法依赖的package包/类
private void deleteCoinFromList(String symbol) {
ArrayList<String> coins = Hawk.get(USER_COIN_LIST, new ArrayList<String>());
if (coins.contains(symbol)) {
coins.remove(symbol);
Hawk.put(USER_COIN_LIST, coins);
}
}
示例8: startRecording
import com.orhanobut.hawk.Hawk; //导入方法依赖的package包/类
private void startRecording() {
boolean prefHighQuality =
Hawk.get(getApplicationContext().getString(R.string.pref_high_quality_key), false);
audioRecorder.startRecord(
prefHighQuality ? Constants.RECORDER_SAMPLE_RATE_HIGH : Constants.RECORDER_SAMPLE_RATE_LOW);
handler.startDbmThread();
audioRecorder.subscribeTimer(this::updateNotification);
}
示例9: updateTheme
import com.orhanobut.hawk.Hawk; //导入方法依赖的package包/类
public void updateTheme() {
this.primaryColor = Hawk.get(context.getString(R.string.preference_primary_color),
getColor(R.color.av_color5));
this.accentColor = Hawk.get(context.getString(R.string.preference_accent_color),
getColor(R.color.av_color5));
this.layerColor = Hawk.get(context.getString(R.string.preference_layer_colors),
ColorPalette.getColors(context, ContextCompat.getColor(context, R.color.av_color5)));
baseTheme = Theme.fromValue(Hawk.get(context.getString(R.string.preference_base_theme), 1));
}
示例10: isFirstTimeLogin
import com.orhanobut.hawk.Hawk; //导入方法依赖的package包/类
public Boolean isFirstTimeLogin() {
if (Hawk.get(KEY_FIRST_TIME) != null) {
return Hawk.get(KEY_FIRST_TIME);
} else {
return true;
}
}
示例11: getUnsplashAppID
import com.orhanobut.hawk.Hawk; //导入方法依赖的package包/类
public static String getUnsplashAppID() {
return Hawk.get("CUSTOM_UNSPLASH_APP_ID", BuildConfig.APP_ID);
}
示例12: getUnsplashSecret
import com.orhanobut.hawk.Hawk; //导入方法依赖的package包/类
public static String getUnsplashSecret() {
return Hawk.get("CUSTOM_UNSPLASH_SECRET", BuildConfig.SECRET_ID);
}
示例13: isAuthorized
import com.orhanobut.hawk.Hawk; //导入方法依赖的package包/类
public static boolean isAuthorized() {
return Hawk.get("IS_AUTHORIZED", false);
}
示例14: getAccessToken
import com.orhanobut.hawk.Hawk; //导入方法依赖的package包/类
public static AccessToken getAccessToken() {
return Hawk.get("ACCESS_TOKEN", null);
}
示例15: getMeProfile
import com.orhanobut.hawk.Hawk; //导入方法依赖的package包/类
public static Me getMeProfile() {
return Hawk.get("ME_PROFILE", null);
}