• Android imitates QQ grouping to realize two level menu display


    This example for you to share Android QQ group to achieve two-level menu display specific code, for your reference, the specific content is as follows First show the effect to be achieved For dynamic view, please see the link 1. First, define the item, that is, the item of secondary display child_item.xml <?xml version=”1.0″ encoding=”utf-8″?> […]

  • Detailed explanation of Android JNI, let you thoroughly understand JNI (2): usage analysis


    catalog Usage analysis├ – 1. JNI function │ ├── 1.1、extern “C” │ ├── 1.2、JNIEXPORT、JNICALL3. Function name │ ├── 1.4、JNIEnv │ ├── 1.5、jobject𗍊 – 2. Mapping relations of Java, JNI and C / C + + basic types├ – 3. JNI descriptor (signature)Function static registration and dynamic registration1. Principle of dynamic registration2. Principle of static registration3. […]

  • Android realizes the function of remembering password


    In this paper, we share the specific code of Android to remember the password function for your reference. The specific content is as follows package com.wangdeqiang.www.chatwithrobot.BroadcastBestPractice; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; import android.view.View; import android.widget.Button; import android.widget.CheckBox; import android.widget.EditText; import android.widget.Toast; import com.wangdeqiang.www.chatwithrobot.R; import static; /** * @author */ public […]

  • The most scientific writing usage of Android alert dialog


    First, let’s look at the picture above   XML code is as follows, used to write buttons: The Java code is as follows to implement the logic: import; import; import; import android.content.DialogInterface; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.Toast; public class MainActivity extends AppCompatActivity{ int index; String [] item = {“Android”,”IOS”,”Spark”,”Hadoop”,”Web”}; […]

  • Android implementation remembers user name and password and automatically logs in


    The first project that I came into contact with when I graduated from school was mobile nurse station. The first task I received was to log in and use the automatic login function. So I made a record here. When I used it in the future, I would paste and copy it directly. Let’s talk […]

  • QT realizes the function of HTML to PDF on Android platform


    Qt for Android Qt for Android enables you to run Qt 5 applications Android devices. All Qt modules (essential and add-on) are supported except Qt WebEngine, Qt Serial Port, and the platform-specific ones (Qt Mac Extras, Qt Windows Extras, and Qt X11 Extras).   On windows or Linux platform, qtwebengine module can be used to […]

  • An article to understand the extension method of kotlin


    Usage Extension function is another killer function of kotlin. It can extend the ability of some classes without modifying the source code, which is convenient for development. For example, this shows how to add a method to a string to get the first element. fun String.first(): Char { if (isEmpty()) { throw NoSuchElementException(“String is empty”) […]

  • Android gets security code SHA1


      Step 1: Win + R output CMD, enter the command line, find the JDK installation path, and enter the bin folder Step 2: input keytool.exe -List – keystore plus. Android folder debug.keystore File path Step 3: input the password. In general, if there is no password, press enter directly     The last CV […]

  • Android alliance third party login and sharing code


    preface Recently, we need to integrate the three-party login and sharing of Youmeng in the project. We haven’t recorded it before, so let’s write about it this time preparation 1. Register the Youmeng account to create an application and obtain key: application address 2. Apply for a third-party account for the corresponding platforms (Tencent, […]

  • Determine whether the application is in the foreground


    private boolean isForeground() { ActivityManager activityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE); List processes = activityManager.getRunningAppProcesses(); if (processes == null || processes.isEmpty()) { return false; } for (ActivityManager.RunningAppProcessInfo info : processes) { if (info.processName.equals(getPackageName()) && info.importance == ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND) { return true; } } return false; }   

  • Android WiFi Hotspot Development example code


    Last time I wrote about Android connecting to anonymous WiFi. WiFi development for application layer development is a relatively small knowledge point, but since it is used, it will be recorded here. Creating hotspots 1. Create hotspots according to encryption type, password, hidden or not static WifiConfiguration createWifiConfig(String SSID, @WifiSecurityType int wifiCipherType, String password, boolean […]

  • How to switch the interface of flutter to achieve some special effects


    background We know that if you switch between pages directly, it will be hard, and it will make users feel very abrupt, and the user experience is not very good. Therefore, in general, in order to achieve smooth transition between pages, animation will be added. In addition, sometimes we don’t like the default animation of […]