資源簡介
【Android studio開發(fā)】
【核心代碼】
public void updateBingPic() {
String requestBingPic = "http://guolin.tech/api/bing_pic";
OkHttp.sendRequestOkHttpForGet(requestBingPic, new Callback() {
@Override
public void onFailure(Call call, IOException e) {
e.printStackTrace();
}
@Override
public void onResponse(Call call, Response response) throws IOException {
String bingPic = response.body().string();
SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(WeatherActivity.this).edit();
editor.putString("bing_pic", bingPic);
editor.apply();
}
});
}
代碼片段和文件信息
/**
?*?Automatically?generated?file.?DO?NOT?MODIFY
?*/
package?com.dong.dongweather.test;
public?final?class?BuildConfig?{
??public?static?final?boolean?DEBUG?=?Boolean.parseBoolean(“true“);
??public?static?final?String?APPLICATION_ID?=?“com.dong.dongweather.test“;
??public?static?final?String?BUILD_TYPE?=?“debug“;
??public?static?final?String?FLAVOR?=?““;
??public?static?final?int?VERSION_CODE?=?1;
??public?static?final?String?VERSION_NAME?=?“1.0“;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-06-08?17:20??DongWeather22\
?????目錄???????????0??2017-06-08?17:19??DongWeather22\.git\
?????文件??????????13??2017-04-15?17:13??DongWeather22\.git\COMMIT_EDITMSG
?????文件??????????23??2017-04-15?17:02??DongWeather22\.git\HEAD
?????文件?????????308??2017-04-15?17:02??DongWeather22\.git\config
?????文件??????????73??2017-04-15?17:02??DongWeather22\.git\desc
?????目錄???????????0??2017-06-08?17:19??DongWeather22\.git\hooks\
?????文件?????????478??2017-04-15?17:02??DongWeather22\.git\hooks\applypatch-msg.sample
?????文件?????????896??2017-04-15?17:02??DongWeather22\.git\hooks\commit-msg.sample
?????文件?????????189??2017-04-15?17:02??DongWeather22\.git\hooks\post-update.sample
?????文件?????????424??2017-04-15?17:02??DongWeather22\.git\hooks\pre-applypatch.sample
?????文件????????1642??2017-04-15?17:02??DongWeather22\.git\hooks\pre-commit.sample
?????文件????????1348??2017-04-15?17:02??DongWeather22\.git\hooks\pre-push.sample
?????文件????????4951??2017-04-15?17:02??DongWeather22\.git\hooks\pre-reba
?????文件?????????544??2017-04-15?17:02??DongWeather22\.git\hooks\pre-receive.sample
?????文件????????1239??2017-04-15?17:02??DongWeather22\.git\hooks\prepare-commit-msg.sample
?????文件????????3610??2017-04-15?17:02??DongWeather22\.git\hooks\update.sample
?????文件????????8141??2017-04-15?17:42??DongWeather22\.git\index
?????目錄???????????0??2017-06-08?17:19??DongWeather22\.git\info\
?????文件?????????240??2017-04-15?17:02??DongWeather22\.git\info\exclude
?????目錄???????????0??2017-06-08?17:19??DongWeather22\.git\logs\
?????文件?????????329??2017-04-15?17:13??DongWeather22\.git\logs\HEAD
?????目錄???????????0??2017-06-08?17:19??DongWeather22\.git\logs\refs\
?????目錄???????????0??2017-06-08?17:19??DongWeather22\.git\logs\refs\heads\
?????文件?????????329??2017-04-15?17:13??DongWeather22\.git\logs\refs\heads\master
?????目錄???????????0??2017-06-08?17:19??DongWeather22\.git\logs\refs\remotes\
?????目錄???????????0??2017-06-08?17:19??DongWeather22\.git\logs\refs\remotes\origin\
?????文件?????????183??2017-04-15?17:02??DongWeather22\.git\logs\refs\remotes\origin\HEAD
?????文件?????????140??2017-04-15?17:15??DongWeather22\.git\logs\refs\remotes\origin\master
?????目錄???????????0??2017-06-08?17:19??DongWeather22\.git\ob
?????目錄???????????0??2017-06-08?17:19??DongWeather22\.git\ob
............此處省略1926個文件信息
- 上一篇:android 音樂播放器
- 下一篇:android 圖書管理系統(tǒng)源碼
評論
共有 條評論