資源簡介
為了方便Android開發,特封裝了一些關于Retrofit2的代碼,分享給大家。框架主要包括:Get請求、Post請求、文件上傳、文件下載。效果圖及講解見:https://blog.csdn.net/ahuyangdong/article/details/82760382
代碼片段和文件信息
package?com.dommy.retrofitframe;
import?android.content.Context;
import?android.support.test.InstrumentationRegistry;
import?android.support.test.runner.AndroidJUnit4;
import?org.junit.Test;
import?org.junit.runner.RunWith;
import?static?org.junit.Assert.*;
/**
?*?Instrumented?test?which?will?execute?on?an?Android?device.
?*
?*?@see?Testing?documentation
?*/
@RunWith(AndroidJUnit4.class)
public?class?ExampleInstrumentedTest?{
????@Test
????public?void?useAppContext()?{
????????//?Context?of?the?app?under?test.
????????Context?appContext?=?InstrumentationRegistry.getTargetContext();
????????assertEquals(“com.dommy.retrofitframe“?appContext.getPackageName());
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-09-18?17:22??Retrofitfr
?????文件?????????147??2018-09-17?11:04??Retrofitfr
?????目錄???????????0??2018-09-26?15:15??Retrofitfr
?????目錄???????????0??2018-09-18?17:09??Retrofitfr
?????文件?????????545??2018-09-17?11:40??Retrofitfr
?????目錄???????????0??2018-09-18?17:09??Retrofitfr
?????文件????????1803??2018-09-17?11:04??Retrofitfr
?????文件?????????626??2018-09-17?11:04??Retrofitfr
?????目錄???????????0??2018-09-18?17:09??Retrofitfr
?????文件????????1444??2018-09-17?11:04??Retrofitfr
?????目錄???????????0??2018-09-18?17:09??Retrofitfr
?????文件?????????529??2018-09-17?11:04??Retrofitfr
?????文件?????????637??2018-09-17?11:04??Retrofitfr
?????文件?????????544??2018-09-17?11:04??Retrofitfr
?????文件?????????677??2018-09-17?11:04??Retrofitfr
?????文件?????????648??2018-09-17?11:04??Retrofitfr
?????文件?????????658??2018-09-17?11:04??Retrofitfr
?????文件?????????525??2018-09-17?11:04??Retrofitfr
?????文件?????????489??2018-09-17?11:04??Retrofitfr
?????文件?????????510??2018-09-17?11:04??Retrofitfr
?????文件?????????384??2018-09-17?11:04??Retrofitfr
?????文件?????????497??2018-09-17?11:04??Retrofitfr
?????文件?????????427??2018-09-17?11:04??Retrofitfr
?????文件?????????504??2018-09-17?11:04??Retrofitfr
?????文件?????????492??2018-09-17?11:04??Retrofitfr
?????文件?????????483??2018-09-17?11:04??Retrofitfr
?????文件?????????489??2018-09-17?11:04??Retrofitfr
?????文件?????????489??2018-09-17?11:04??Retrofitfr
?????文件?????????489??2018-09-17?11:04??Retrofitfr
?????文件?????????471??2018-09-17?11:04??Retrofitfr
?????文件?????????516??2018-09-17?11:04??Retrofitfr
............此處省略116個文件信息
- 上一篇:java編寫的智能五子棋
- 下一篇:POP3的java郵件接收程序
評論
共有 條評論