Play Android project development - Homepage 2 (use ViewPager to customize banner carousel chart)
In the last section Play Android project development - homepage (ViewPager+BottomNavigationBar to implement navigation bar) Now we start to fill in the function from the homepage, that is, mainframe.
1. MVP framework construction of Fragment
Before that, we used Activity as the View layer. In this proje ...
Posted by Piranha on Wed, 12 Feb 2020 19:05:31 -0800
app evokes the perfect solution and prevents browser's default pop-up behavior
https://stackoverflow.com/questions/10237031/how-to-open-a-native-ios-app-from-a-web-app
var frame = document.createElement('iframe'); frame.src = 'myapp://?params=...'; frame.style.display = 'none'; document.body.appendChild(frame); setTimeout(function() { document.body.removeChild(frame); }, 4); The above pl ...
Posted by aktell on Wed, 12 Feb 2020 08:49:09 -0800
Retrofit of third party open source library
Current version: 2.7.1
Official document: https://square.github.io/retrofit/Retrofit It is a RESTful encapsulation of HTTP network request framework.
brief introduction
Use
Add a dependency on the Retrofit Library
rely on
dependencies {
...
implementation 'com.squareup.retrofit2:retrofi ...
Posted by Sgt.Angel on Tue, 11 Feb 2020 09:26:35 -0800
What's the difference between the various ways to get context?
Among the various Android codes I've seen:
public class MyActivity extends Activity {
public void method() {
mContext = this; // since Activity extends Context
mContext = getApplicationContext();
mContext = getBaseContext();
}
}
However, I couldn't find any suitable explanation for what was better and in ...
Posted by Barkord on Tue, 11 Feb 2020 05:01:24 -0800
Android-RecyclerView Multi-Layout Encapsulation
Encapsulation of multiple layouts, primarily addressed during developmentData Binding Interface, View Layout Return Interface, Data Binding: Provides a tag attribute in the holder class. Initializing the holder identifies the viewtype returned by the view layout so that switch(holder.gettag()) can de ...
Posted by Jbert2 on Mon, 10 Feb 2020 21:00:43 -0800
PopupWindow bottom box effect
Previous rendering:
When it is displayed, it will slide out from the bottom of the screen. When it disappears, it will slide out. The implementation method is PopWindow. Here is the code:
First, define a PopupWindow class as follows:
public class BottomPopupOption {
//Context object
private Context mContext;
...
Posted by hws on Sun, 09 Feb 2020 09:43:56 -0800
Android RefreshLayout implements pull-up refresh drop-down loading and data De duplication list pages
Add the following dependencies to build.gradle of app in the project:
//RefreshLayout
implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0'
implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.0'
//glide is used to load pictures in item
implementation 'com.github.bumptech.glide:gl ...
Posted by notaloser on Sat, 08 Feb 2020 06:16:24 -0800
Android - mixed use of ViewPager and Fragment
ViewPager is often used to connect fragments. It is very convenient to manage the life cycle of each page. Using ViewPager to manage fragments is a standard adapter implementation. The most commonly used implementations are fragmentpager adapter and fragmentstatepager adapter. By adding a ViewPager to t ...
Posted by jcrensha627 on Fri, 07 Feb 2020 07:01:16 -0800
How to design a cross platform RTMP/RTSP live player with low latency
Development background
In 2015, when we tried to find a low latency player for live broadcast on the market to cooperate with the test of our RTMP push module, we found that none of them were easy to use, such as VLC or Vitamio, which were all based on FFMPEG. There were many supporting formats and ...
Posted by EZE on Fri, 07 Feb 2020 05:34:44 -0800
Android About AIDL Communication, RemoteCallbackList Implements Server Callback Client
Android Interface Definition Language (AIDL)
The Android Interface Definition Language (A IDL) is similar to other interface languages (IDLs) you may have used.It allows you to define programming interfaces that are recognized by both clients and services so that they can communicate with each other ...
Posted by BPWheeler on Tue, 04 Feb 2020 19:33:10 -0800