Android USB code scanning gun obtains scanning content

Recently, I have made a project about external code scanning on Android devices. Here, I record the problem about obtaining content from Android USB code scanning gun First of all, I use the USB HID code scanning gun, plug and play. Just have an EditText with focus on the interface to get the scanning content of the code scann ...

Posted by barryman9000 on Tue, 31 Dec 2019 12:47:16 -0800

How to design a nice user name and password input box for Android studio

How to design a nice user name and password input box for Android studio Hello everyone, today is my first time to write a blog. I'm not familiar with the functions of blogging. Please forgive me and criticize me Equivalent to a registration page ----------<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:and ...

Posted by techek on Tue, 31 Dec 2019 12:05:15 -0800

Android development tips: set the color transparency of status bar

  Before Android 4.4, our application couldn't change the color of the status bar of the mobile phone, as shown in the figure above. In order to provide better interface interaction, google started to provide a method to set the immersive status bar in Android 4.4.2. The actual effect is the transparent status bar, and then ...

Posted by qbox on Tue, 31 Dec 2019 06:47:58 -0800

android calls system camera to take multiple photos

Android calls the system camera once, takes multiple photos and returns them to activity. In fact, Android does not provide such an api, but it can achieve this function in other ways. Idea: write down the time stamp before calling the system camera, and then go to the system picture media library to query the pictures whose c ...

Posted by mac25 on Tue, 31 Dec 2019 03:46:33 -0800

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

Kotlin: timing animation of Android Homepage

Here are several steps: Set the Activity of the home page as the start page Rewrite onCreate, call two functions, defined animation function, monitor function First, set the start page: add the intent filter to the activity. The first action is to set the main page, and the second is specifically defined as the start page. ...

Posted by Hybride on Tue, 31 Dec 2019 00:00:44 -0800

Android uses HTTP protocol to access the network

At present, there are two commonly used methods to send HTTP requests, one is HttpURLConnection (official recommended usage), the other is OkHttp (developed by Square) The first method: Get HttpURLConnection instance URL url = new URL("https://www.baidu.com"); connection = (HttpURLConnection) url.openConnection(); Set the m ...

Posted by tlavelle on Mon, 30 Dec 2019 23:31:54 -0800

Quanzhi H6 Orange Pi Lite 2 Android 7.0 WIFI configuration

Problem reason At present, the WIFI of the image compiled by our SDK is useless. We will continue to solve this problem. Check the schematic diagram and confirm the pin It can be confirmed from the schematic diagram that SDC1 module is used for WIFI, power supply is provided by VCC33-WIFI, and VCC33-WIFI is provided by CLDO3 ...

Posted by haixiao on Mon, 30 Dec 2019 20:53:46 -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