Android Development: The Use of ViewPage

** (Note: The example in this article uses Constraint Layout layout) ViewPage can be used in two ways, one is to load the layout file directly (using the Pager Adapter) and the other is to load the fragment (using the Fragment Pager Adapter). * * Design sketch: I. Direct Loading of Layout Files 1. Add ViewPage to the main layout <?x ...

Added by Broniukas on Sat, 15 Jun 2019 06:42:27 +0300

Android uses SuperButton of the View series (which implements most of shape s)

In the development process, our buttons basically have their own style. Sometimes we need to make a rounded corner, sometimes we need a border, sometimes we need a dashed border or we need a circular button. Think that most of the implementation is to write a shape file, define the border rounded corners and other related attributes inside. If ...

Added by veridicus on Sat, 15 Jun 2019 06:14:36 +0300

android parses android Manifest. XML in the unassembled apk and system source code analysis

Preface: Scenario: Without installing the apk, get the package name, LAUNCHER Activity, etc. in the apk. This requires parsing our Android Manifest. XML file, and our APK is a zip compressed file, which is opened by compressing the file - good pressure, rar and so on. You can see the above directory, and our Android Manifest. xml is in it ...

Added by spxdcz on Sat, 15 Jun 2019 01:20:00 +0300

An Implementation Strategy of Computer-like Grid Layout on Android Tablet

Realization of Grid List on Flat Panel On the tablet, many app s have lists similar to computers, which can be slid up and down. After that, each column has many categories. Each category takes up different space, which is somewhat complicated to implement. The following is directly shown in the figure above. There is no dividing line in th ...

Added by TipPro on Fri, 14 Jun 2019 23:24:15 +0300

Android Immersion Status Bar Implementation Strategy (I)

First let's look at what immersion is. Google's official explanation is to immerse the entire APP (full screen) in the screen, without showing the status bar, or even the bottom navigation bar. Usually, the immersion we discuss is another way of UI display: the immersion we usually discuss: for example, the top Toolbar of Netease News and th ...

Added by ilikemath2002 on Fri, 14 Jun 2019 03:19:48 +0300

Using Kotlin to implement Android Simple Demo and comparing JAVA implementation to analyze specific syntax differences (2)

Using Kotlin to implement Android Simple Demo and comparing JAVA implementation to analyze specific syntax differences (2) Before writing, the previous article simply realized the creation of Kotlin project files, and recorded the differences between the default generated code and the JAVA implementation. This article enumerates the differ ...

Added by fri on Fri, 14 Jun 2019 03:00:48 +0300

Android Mobile Live Broadcast (IV) Android Media API

I. Articles Description Recently, I have been too busy to update my articles for a long time. I have received a lot of news from my friends to urge me to update them. I am really ashamed to update them when I am free today. The first article introduced Android mobile live broadcasting in general, and then two articles introduced video and audio ...

Added by nhanlee on Fri, 14 Jun 2019 02:26:41 +0300

This time, we parse the source code of the Android messaging mechanism in the most detailed way.

Handler Source Parsing 1. Creating Handler Objects The easiest way to use handler: directly new a handler object Handler handler = new Handler(); So let's look at the source code of its constructor: public Handler() { this(null, false); } public Handler(Callback callback, boolean async) { if (FIND_POTENTIAL_LEAKS) { ...

Added by keyur.delhi on Fri, 14 Jun 2019 01:30:09 +0300

android APK dynamically adds data

Preface: Some time ago, there was a demand: 1. It is necessary to obtain channel information of current APK without installing apk. 2. Users download apk s on specific pages and need to jump to the corresponding pages in the app to make the app user experience better. The first requirement is handled by parsing the xml file to get channel i ...

Added by kbc1 on Fri, 14 Jun 2019 01:12:12 +0300

How to use Kotlin to develop projects in Android Studio

Kotlin has become the official language of Android, and I believe it will be used more and more widely in the future. But only Android Studio 3.0 can support Kotlin. How can we use Kotlin to develop Android projects in versions below 3.0? This requires the installation of the kotlin plug-in. Kotlin resources: Official website: http://kotlinl ...

Added by Mr Camouflage on Thu, 13 Jun 2019 23:07:30 +0300