View's Click Event

1. Onclick property specification public class FirstActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_first); } public void welcome(View view) { Toast.makeText(this,"Welcome",T ...

Posted on Mon, 15 Jul 2019 09:59:34 -0700 by advancedfuture

EventBus Communication Skiller

1. Introduction to EventBus EventBus is a lightweight framework for Android event publishing/subscribing developed by Green Robot. It has the following characteristics: concise code and is a publishing and subscribing design pattern (observer design pattern). EventBus can replace Android's traditional Intent, Handler, Broadcast or interface fun ...

Posted on Sun, 14 Jul 2019 16:47:55 -0700 by sunnyk

Android-Asynchronous Message Processing Mechanism 2 and Introduction to Handler Thread

Android-Asynchronous Message Processing Mechanism 2 and Introduction to Handler Thread Android's asynchronous message processing mechanism was introduced in the last article. Here are some supplements. Let's talk about message processing in multithreading and Handler Thread. If you don't know much about handler's mechanism, you can read the pre ...

Posted on Sun, 14 Jul 2019 10:33:36 -0700 by coreyp_1

Source Code Analysis of Fragment Operating Mechanism (I)

Reprint address: http://blog.csdn.net/yuanzeyao/article/details/52822315 Fragment is introduced in Android 3.0 to facilitate screen adaptation. Although it was launched earlier, there are many Bugs in Fragment itself and it is much more complex than Activity, so there are not many students who really grasp the operation mechanism of Frag ...

Posted on Sat, 13 Jul 2019 11:39:58 -0700 by ryochiji

Use of SurfaceView for Android Custom Camera (6.0 Permission Request)

Preface There has been no update since I was preparing to jump.However, from this month on, I will continue to record some pits I encountered in android development or write interesting articles.I hope you continue to pay attention to it.Okay, get to the point. Summary This time I started to get to know something about Camera, so I decided to ...

Posted on Sat, 13 Jul 2019 09:17:40 -0700 by CSB

Solutions to overlap in Android using Fragment

Reprinted from: http://blog.csdn.net/jiangxuqaz/article/details/51707031 Reference resources: http://stackoverflow.com/questions/16189088/overlapping-hidden-fragments-after-application-gets-killed-and-restored http://stackoverflow.com/questions/18274732/android-fragments-overlapping-issue?answertab=active#tab-top Fragment ov ...

Posted on Fri, 12 Jul 2019 16:51:51 -0700 by soul

Fragment's Packing Problems and Relevant Attentions

We know that android sdk has a v4 package, which, like v7, is mainly used to implement low-level version compatibility of some functions. The official launch of Fragment is after 3.0. If we want to be compatible with Android version 1.6, we need to use Fragment in v4 package. Let's first see which packages need to be imported for normal use ( ...

Posted on Fri, 12 Jul 2019 12:40:18 -0700 by TomatoLover

[Android Component Interpretation] Initial exposure to Retrofit

When it comes to web libraries, you think of Google's HuttpUrlConnection and Apache's HuttpClient. Google recommends using HttpUrlConnection instead of HttpClient HttpClient has been discarded in Android6.0 (Tucao: obviously HttpClient is more powerful). To see why HttpClient was abandoned, you can see Why did Google recommend using HttpURLCon ...

Posted on Fri, 12 Jul 2019 12:28:34 -0700 by renekosterman

Android Custom Star Rating Control

Reproduction: Android Custom Star Rating Control Source code: http://download.csdn.net/detail/a756213932/9579325 The design of star rating control is as follows: Two pictures are needed, one bright star and one empty star; (of course, pictures are not necessarily stars, other pictures are okay, just use stars for the experiment now.) The n ...

Posted on Fri, 12 Jul 2019 11:35:06 -0700 by sarijit

Custom View - A Demo gives you a thorough grasp of View's sliding conflicts (5)

First picture: The example is a common pull-down rebound in which the entire layout slides together as the fingers slide down. When pulled down to a certain distance, the layout will automatically rebound to the starting position; when the finger slides up, the sub-View of the layout will slide to the bottom, then the finger slides down agai ...

Posted on Fri, 12 Jul 2019 11:14:30 -0700 by mk_silence