android development modify status bar background color and icon color

Change the status bar background and icon colors By default, it's white on black. Now it's black on white First, look at the renderings: Screenshot_2018-01-03-19-20-27-797_com.yiban1314..png 1. Status bar background is white: set in style <item name="colorPrimaryDark">@color/white</item> 2. Write to modify the color of the s ...

Posted by mcollyns on Thu, 30 Apr 2020 13:11:17 -0700

Use of Android BottomNavigationView

Google's officially updated Support25.0.0 includes the bottom Navigation view, which is the bottom navigation bar component, as shown in the following figure: Let's take a look at how to use this component Upgrade Support package Upgrade the Support package to 25.0.0 and add a reference to build.gradle dependencies { co ...

Posted by nitram on Thu, 30 Apr 2020 12:34:00 -0700

Judge whether Android mobile phone (OPPO mobile phone) has recording permission compatible with less than 6.0

In the project, when the old version of OPPO mobile 5.1 is encountered, the recording permission is explicitly denied, but the callback is still true. Since 6.0, the runtime permission has been issued, and the way to obtain the permission has become unified. First, configure the required permission in the list file, and then take photos or re ...

Posted by unknownsheep on Thu, 30 Apr 2020 08:16:49 -0700

Zhihu daily client -- look at the section every day

After reading this article, you should learn how to show the photo wall and save the pictures to the local place. design sketch: The last one is about: The realization of Zhihu daily Knowledge points of this article include: Okhttp, Picasso, CardView, dynamic request permission, create file, folder, save picture. Layout first: Material ...

Posted by adrafa on Thu, 30 Apr 2020 00:46:42 -0700

Android serial 8-dynamic add fragment

1, Add fragment dynamically   <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ffff00" android:orientation="vertical" > <TextView and ...

Posted by nikifi on Wed, 29 Apr 2020 22:23:08 -0700

OkHttp implements automatic refresh of globally expired token s

#Problem encountered: App currently being developed has a problem: When an interface is requested, it will fail because the token is no longer valid.However, the product manager expects the app to refresh the token immediately and then repeat the request for the interface, which is insensitive to the user.>This means silent automatic login a ...

Posted by timandkitty on Tue, 28 Apr 2020 09:59:38 -0700

Android development template code (1) -- simply open the gallery and select photos

First, post the sample code //Check permissions public void checkPermission() { if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1); ...

Posted by perfume on Sun, 26 Apr 2020 08:15:21 -0700

AAC trial packaging

The full name of aac is Android architecture components. Google recently released an official version and was immediately attracted by it. Isn't that the magic medicine to improve the traditional MVP? To add dependency, we will not repeat it. For many examples on the Internet, this article just encapsulates ViewModel and LiveData! 1. Creat ...

Posted by greepit on Sat, 25 Apr 2020 08:08:56 -0700

Inverse analysis of floating VIEW of SOUL ANDROID APP and linkage refresh of VIEW in post

Inverse analysis of floating VIEW of SOUL ANDROID APP and linkage refresh of VIEW in post Soul app is a competitive product of our company. We are very interested in the logic of synchronous linkage of voice music playback, so we started a wave of reverse analysis. Let's look at the code and technical analysis, and go straight to the right trac ...

Posted by lamia on Sat, 25 Apr 2020 02:55:29 -0700

Android access to Alipay payment implementation

Next, android access WeChat payment article, this we take you to access Alipay payment services. brief introduction The first thing to explain is that personal feeling is much easier to access Alipay than WeChat, so students should not be nervous. Of course, it's still the old rule. I'll stick it up for sure Official website address , bec ...

Posted by mattvenables on Fri, 24 Apr 2020 10:57:53 -0700