An LRU implementation for recording the latest search history

For many functions with search requirements, it is generally necessary to display the latest n historical search records, mainly including the following function points: The most recent search items are placed first, and the earliest search records are placed last. Only record the latest n data. If there are more than n search records, delet ...

Posted by gazza52 on Fri, 01 May 2020 02:12:24 +0200

The basic syntax and types of Kotlin

Basic types Basic types used in Kotlin: numbers, characters, Booleans, arrays, and strings. number Type Bit Double 64 loat 32 Long 64 Int 32 Short 16 Byte 8 Representation In Kotlin, the values can be expressed literally as follows: Decimal: 123 Long type is marked with capital L: ...

Posted by NotVeryTechie on Fri, 01 May 2020 00:10:34 +0200

RxJava operators - transform operators

The event / whole event sequence in the event sequence is processed (i.e. transformed) to different event / whole event sequence map Each event sent by the observed is processed by a specified function, so that it can be transformed into another event That is, the event sent by the observer is converted to any type of event. Application sc ...

Posted by Millar on Thu, 30 Apr 2020 22:53:26 +0200

49.(android Development) imageView picture switching

The image view control of android is very common. It's easy to display pictures. Just set the picture source. Generally, we use the resources in the APP to achieve this. The original image file is placed in drawable or mipmap under res. What I want to achieve this time is to let the control display a picture by default. When I click a button, t ...

Posted by Channel5 on Thu, 30 Apr 2020 22:39:33 +0200

android sets button style (border color, fillet) and picture style (fillet)

android sets button style (border color, fillet) and picture style (fillet) Set button border color: Create a new button? Edge.xml file in drawable <?xml version="1.0" encoding="UTF-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Border color value --><item> < ...

Posted by FrozNic on Thu, 30 Apr 2020 21:02:04 +0200

Android date format conversion (date to cycle)

Recently, I met a requirement in my own project to convert the standard day yyyy MM DD into a specific cycle, that is, the day of the week. By looking up the data, we found that Android has provided us with a powerful date tool Calendar class, through which we can quickly realize the conversion between dates. Here, I have encapsulated it as a ...

Posted by Lars Berg on Thu, 30 Apr 2020 20:55:42 +0200

The effect of a simple rolling number

1. Renderings 2. Custom attributes textColor font color textSize font size Time displayed in duration text 3. Instructions Step 1. Add it in your root build.gradle at the end of repositories: allprojects { repositories { ... maven { url 'https://jitpack.io' } } ...

Posted by r3drain on Thu, 30 Apr 2020 15:14:46 +0200

Flutter writes an iOS style address book

This article mainly introduces how to use the Cupertino style control of Flutter to write an iOS style address book, as well as the problems encountered in the process and solutions. When you write apps with Flutter, you will generally use material style controls. Because material style controls are rich, but they will appear Android flavor on ...

Posted by Shamrox on Tue, 28 Apr 2020 22:09:31 +0200

Python adb test of repeated network disconnection in selfie 62

Case story: during Android App or system testing, it involves abnormal test of network disconnection (in case of no network, whether the App or system prompts normal operation), Networking test (in case of network recovery, whether the App or system prompts to be normal and operates normally). At present, the equipment basically has two kinds ...

Posted by ViperSBT on Sat, 25 Apr 2020 15:42:12 +0200

Nested use of Card View layout in Fragment

Nested Card View layout in Fragment Look at the effect first: The layout file of Fragment is very simple, just a RecyclerView layout <android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/recycler_view" android:layout_width="match_parent" android:layout_heigh ...

Posted by Serpent7 on Tue, 14 Apr 2020 18:52:52 +0200