The screenshot of the Android activity is saved and displayed to the album View. The animation of the picture disappears

Today, there is a requirement for the project. Take a screenshot of the Activity interface, save it locally, and then send the picture when you send it instantly Process: screenshot - > save to local - > send broadcast notice to update Gallery Paste the renderings first Screen capture process Files saved after screen capture Scre ...

Posted on Sat, 02 May 2020 06:41:57 -0700 by partypete

Tab radiobutton+drawableTop toggle change text color and picture

Implementation effect: radiobutton uses drawableTop to display pictures (use drawableTop selector and text color change selector in xml) code to set picture size) Put these 6 pictures (unchecked, checked) recommend_unselected      recommend_selected                           smile_unselected                    smile_selected      ...

Posted on Sat, 02 May 2020 03:36:19 -0700 by weknowtheworld

android collapsible title block

1, First, let's see the effect 2, Code 1,MainActivity.java package com.example.lcf.myapplication; import android.os.Bundle; import android.support.design.widget.CollapsingToolbarLayout; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.To ...

Posted on Sat, 02 May 2020 03:35:56 -0700 by weazy

The ninth chapter Spring Cloud Feign declarative call service

In the Spring Cloud Netflix stack, each microservice exposes its own services in the form of HTTP interface, so HTTP client must be used when calling remote services. We can use the native URLConnection of JDK, HttpClient of Apache and asynchronous HTTP of Netty Client, Spring's RestTemplate. But the most convenient and elegant thing to use i ...

Posted on Thu, 30 Apr 2020 22:26:04 -0700 by adksga

Using BlockingCollection to implement producer and consumer queues and write text

Recently, several small projects have been developed. The results need to be written into a txt file and divided into files according to the time. Due to the high efficiency requirements, the producer and consumer models are used to write the text. The thread only needs to add a queue and return immediately, without waiting for the time to writ ...

Posted on Thu, 30 Apr 2020 19:40:04 -0700 by peranha

A encapsulated countdown control

This time, it brings a countdown control named TimingTextView, which still has only one file. Copy and paste are available. If you don't say much, you can say it TimingTextView.java: public class TimingTextView extends TextView { private static final int TIME_START = 0x001; private static final int TIME_FINISH = 0x002; private ...

Posted on Thu, 30 Apr 2020 14:53:16 -0700 by cdinca

JavaScript uses btoa and atob to encode and decode Base64

btoa and atob are two functions of window object. btoa is binary to ascii, which is used to represent binary data with ascii code, i.e. Base64 encoding process, while atob is ascii to binary, which is used to parse ascii code into binary data. Let's see an example: // Define the string var string = 'Hello World!'; // Encode the String var enc ...

Posted on Thu, 30 Apr 2020 14:29:21 -0700 by mrneilrobinson

DrawerLayout+NavigationView main interface of imitating Moby bike

In the past, SlidingMenu was usually used, but there were too many properties to set, which made it cumbersome to use. Later, the official DrawerLayout came out, which made the sideslip control positive, and the function effect was better. Here is the main interface that I use DrawerLayout+NavigationView to imitate Moby bike. visual effect: ...

Posted on Thu, 30 Apr 2020 12:14:29 -0700 by Eclesiastes

A sliding scoring control

This time it brings a sliding scoring control. When doing the scoring function, you often need a control to drag a finger to score. In fact, this kind of control has a lot of 100 degrees. I wrote one a long time ago, and I'll share it with you here. The control is named SlideToGradeLayout. There is only one file. Copy and paste are available ...

Posted on Thu, 30 Apr 2020 09:52:15 -0700 by fross

Android project practice series - registration and login module based on erudite Valley

As this module has a lot of content and a long space, please read it patiently. Registration and login module is divided into three parts [x] Welcome screen [x] Registration interface [x] Login interface 1, Welcome screen 1. Create a project named BoXueGu, and the package name is com.boxuegu. 2. Import the interface picture, Lun bg.p ...

Posted on Sun, 26 Apr 2020 17:58:34 -0700 by jdorma0