List of usage examples for android.app WallpaperInfo toString
@Override
public String toString()
From source file:com.lithidsw.wallbox.app.saturate.SaturateFrag.java
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { fa = super.getActivity(); ll = (LinearLayout) inflater.inflate(R.layout.saturate_frag, container, false); prefs = fa.getSharedPreferences(C.PREF, Context.MODE_PRIVATE); mUtils = new Utils(fa); wm = WallpaperManager.getInstance(fa); image = (ImageView) ll.findViewById(R.id.main_image); try {/*www .ja va 2s . com*/ WallpaperInfo info = wm.getWallpaperInfo(); info.toString(); mUtils.sendToast(getResources().getString(R.string.live_wallpaper)); } catch (NullPointerException ignore) { } time_text = (TextView) ll.findViewById(R.id.time_text); seek = (SeekBar) ll.findViewById(R.id.seeker); seek.setMax(23); Calendar cal = Calendar.getInstance(); hour = cal.get(Calendar.HOUR_OF_DAY); time_text.setText(mUtils.getHour(hour)); seek.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar v, int num, boolean isU) { if (!isRunning) { time_text.setText(mUtils.getHour(num)); seekerFl = mUtils.getFloat(num); Drawable d = mUtils.convertToGrayscale(wm.getDrawable(), seekerFl); image.setImageDrawable(d); } } @Override public void onStartTrackingTouch(SeekBar arg0) { // TODO Auto-generated method stub } @Override public void onStopTrackingTouch(SeekBar arg0) { // TODO Auto-generated method stub } }); if (!prefs.getBoolean(C.PREF_SATURATE_FIRST_RUN_MAIN, false)) { prefs.edit().putBoolean(C.PREF_SATURATE_FIRST_RUN_MAIN, true).commit(); String title = getResources().getString(R.string.main_title_saturate); String message = getResources().getString(R.string.saturate_description); new CustomDialogs().openFirstDialog(fa, title, message); } setHasOptionsMenu(true); return ll; }
From source file:com.lithidsw.wallbox.app.wallsnap.WallSnapFragment.java
private void toast4Live() { if (bundle == null) { try {//from w ww . j ava 2s .co m WallpaperInfo info = wm.getWallpaperInfo(); if (info != null) { info.toString(); mUtils.sendToast(mResources.getString(R.string.last_known_current_live)); } } catch (NullPointerException ignore) { } } }