偷懒代码块之首次操作判断。

	private boolean isFrist(){
		int num = sp.getInt("name", 0);
		if(num == 0) return true;
		return false;
	}

	private void notFrist(){
		SharedPreferences.Editor editor = sp.edit();
		editor.putInt("name", 1);
		editor.commit();
	}

你可能感兴趣的:(源码,android,第一次)