Use SmartRefreshLayout to complete the complete example of RecyclerView pull-up refresh and pull-down refresh

First, let's take a look at the effect, first update 5 data items from top to bottom, then slide to the bottom and pull up to add 5 data items from the bottom to the top: We use a third-party library, so we first add it in the gradle configuration file: implementation 'com.android.support:recyclerview-v7:25.3.1' imp ...

Posted by paladaxar on Tue, 31 Dec 2019 01:14:42 -0800

Advanced controls: AutoText box and drop-down list

Advanced controls Advanced control steps 3.1 obtaining data 3.2 create adapter Array adapter Simple adapter 3.3 binding adapter Differences between high-level controls and low-level controls: **Use adapter or not** 1: Auto prompt box 1.AutoCompleteTextView Case 1: automatic completion of data (array ...

Posted by CodeX on Tue, 31 Dec 2019 00:30:30 -0800

[JeeSite] role and permission modification (secondary development code analysis)

@RequiresPermissions("sys:role:edit") @RequestMapping(value = "save") public String save(Role role, Model model, RedirectAttributes redirectAttributes) { if(!UserUtils.getUser().isAdmin()&&role.getSysData().equals(Global.YES)){ addMessage(redirectAttributes, "Unauthorized operation, only super adminis ...

Posted by alan007 on Mon, 30 Dec 2019 23:56:53 -0800

A simple case of starting and terminating Android Service and data transmission

Brief introduction to life cycle method startService() Role: start Service service After manually calling startService(), internal methods are automatically called: onCreate(), onStartCommand() If a service is started multiple times by startService, onCreate() will only call once onStartCommand() calls = startService() calls ...

Posted by bg on Mon, 30 Dec 2019 20:44:51 -0800

Are bean s in spring thread safe?

Spring does not guarantee thread safety of bean s.The bean s in the default spring container are singleton. When there is a race condition in a single case, there is a thread safety problem. As the following example Counting class package constxiong.interview.threadsafe; /** * Counting class * @author ConstXiong * @date 2019-07-16 1 ...

Posted by hucklebezzer on Mon, 30 Dec 2019 20:03:08 -0800

How does the dao interface of mybatis relate to sql in the xml file?Step by step analysis

Preface Before you begin the body, explain how the Dao interface corresponds to the SQL in the XML file. At the end of a sentence, mybatis parses these xml files, establishes a relationship with Dao through the namespace ins id e the xml file, and then associates each sql in the xml with an interface in dao. The question then arises:'If I have ...

Posted by mike_at_hull on Mon, 30 Dec 2019 17:47:17 -0800

[UWP] Design a flat status button for tomato clock applications

1. Why do you need to design a status button OnePomodoro There's a button in the app to control the start/stop of the timer. It should have been a button with two states: Started and Stopped. But I've done too many things like StateButton and ProgressButton on WPF and UWP before and I'm tired of this control, so I'm just using two buttons in O ...

Posted by Stephen on Mon, 30 Dec 2019 11:30:31 -0800

Using Amoeba to realize the read-write separation configuration of database

I. Amoeba It can realize load balancing Read / write separation , high availability, etc. 1.1 installation of JDK (1) Upload JDK (2) Unzip [root@localhost java]# tar -xvf jdk-8u51-linux-x64.tar.gz  (3) Modify system environment variables [root@localhost java]# vim /etc/profile (4) Load JDK configuration [root@lo ...

Posted by cyandi_man on Mon, 30 Dec 2019 06:53:25 -0800

What are the common injection methods of spring?

1. Configuration in xml bean declaration and registration < bean > node register bean Factory bean parameter of < bean > node refers to factory bean, and factory method parameter specifies factory method   bean injection < property > nodes are injected in set mode < constructor Arg > node injection with construc ...

Posted by cornelombaard on Mon, 30 Dec 2019 06:13:24 -0800

Android can print multiple APP packages in the same set of code and install and run on the same mobile phone

Android can print multiple APP packages in the same set of code and install and run on the same mobile phone Android can print multiple APP packages in the same set of code and = = install and run on the same phone = =, and = = APP name and desktop icon are also different== Give different package names to the same set of code ...

Posted by darkhappy on Sun, 29 Dec 2019 07:33:06 -0800