(imitating the headline APP project) 6. The clicked news list text is grayed out and pulled down to refresh and scroll to load the news data

Article catalog 1, Clicked news list text is grayed out design sketch Realization ideas Import ORM Lite database class dependency Using ORM Lite to create database and table Create database class MyDbHelper Create news entity class NewInfo in database Page transaction coding List click event Judg ...

Posted on Thu, 04 Jun 2020 05:33:21 -0700 by lalov1

retrofit2 of Android jar / library source code analysis

catalog: Source code analysis of andorid jar / Library  Retrofit2: Function: The okhttp library is encapsulated to communicate with the web, and the interface address is called by dynamic proxy, and the result is assigned by callback. Chestnut: Define an interface for access usage. public interface IServiceApi { @FormUrlEncoded @POST( ...

Posted on Mon, 27 Apr 2020 07:37:10 -0700 by Miko

A Url encoded pit encountered in the use of Retrofit network framework

Retrofit is a type safe network request framework for Android and Java platforms. The network module of the project is encapsulated by retrofit framework; In the development process, the third-party sdk is used, and the data output by the third party should be uploaded to the server, but the + output from the sdk is transmitted to the ...

Posted on Mon, 06 Apr 2020 01:39:32 -0700 by markstrange

Custom View - Property Animation

ViewPropertyAnimator package com.zhoujian.retrofit.activity; import android.animation.Animator; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; imp ...

Posted on Sat, 22 Feb 2020 06:35:05 -0800 by Jabop

Android Retrofit source series ~ file upload

Introduction to Retrofit series: Android Retrofit source code series (I) ~ principle analysis Android Retrofit source series (2) ~ custom CallAdapter Android Retrofit source series (3) ~ integration of RxJava and Coroutine analysis Android Retrofit source series (IV) ~ file upload Android Retrofit sour ...

Posted on Sat, 18 Jan 2020 02:58:43 -0800 by Buddski

Take you step by step through Retrofit source parsing: a network request framework based on OkHttp

What is the difference and connection between OkHttp and Retrofit? Reference Answer:OkHttp and Retrofit are both popular open source frameworks for networks Packaging is different:Retrofit encapsulates specific requests, thread switching, and data conversion.retrofit encapsulates okhttp using proxy, appearance, and policy patternsOkHttp is a s ...

Posted on Tue, 07 Jan 2020 10:33:13 -0800 by fox_m

Use of Android Retrofit

Step one:   Dependent package import: compile 'com.squareup.retrofit2:retrofit:2.2.0' compile 'com.squareup.okhttp3:okhttp:3.4.1' compile 'com.squareup.retrofit2:converter-gson:2.0.2' Network permissions: <uses-permission android:name="android.permission.INTERNET"/>     The second step: Create interf ...

Posted on Sun, 05 Jan 2020 15:59:51 -0800 by razorsedgeuk

Appreciation of Android wheel's Retrofit source code

Implementation of Service interface in Retrofit For custom Service classes: public interface GithubService { @GET("users/{user}/repos") MyCall<String> listRepos(@Path("user") String user); } When used: GithubService githubService = retrofit.create(GithubService.class); MyCall<String> call = githubSer ...

Posted on Thu, 02 Jan 2020 11:20:01 -0800 by Vball

Retrofit parsing network json

Don't bother a lot of nonsense, finish saying to achieve the final goal, directly enter the main operation, directly go to the code, see the use method   To achieve the goal: use Retrofit to analyze network json, and put RecyclerView in   The first step is to write the layout file and item, which I use here RecyclerView I d ...

Posted on Sat, 28 Dec 2019 09:33:52 -0800 by Richardtagger

Android's adaptation to Retrofit's BaseUrl

Android's adaptation to Retrofit's BaseUrl In a project, you may encounter interfaces that call different domain names or ports, but Retrofit's setting method for BaseUrl does not provide adaptation for different domain names. Our network calls are generally single examples, so it is impossible to build an instance for each do ...

Posted on Wed, 25 Dec 2019 13:59:00 -0800 by fxb9500