原创 Window Type的優先級和權限(用於懸浮窗或窗口實現界面)

Type TYPE_PHONE:電話窗口,這是非應用窗口,用於來電的界面,該窗口通常置於所有應用之上,但在狀態欄下。 TYPE_SYSTEM_ALERT:系統窗口,例如低電量警告彈窗,在應用窗口之上。 TYPE_TOAST:透

原创 如何屏蔽StatusBar和NavigationBar

如何屏蔽StatusBar和NavigationBar 代碼 mLockWindowLayoutParams.type = WindowManager.LayoutParams.TYPE_SYSTEM_ERROR; hideSta

原创 Android屏幕適配相關

(1080p,16:9) 1920x1080->xxhdpi->1dp->3px (720p,16:9) 1280x720->xhdpi->1dp=2px (480p,非標準分辨率,略多於4:3) 800x480->hdpi->

原创 JIT和AOT編譯技術

JIT: JIT是Just in time的縮寫,也就是即時編譯、運行時編譯。使用即時編譯,能夠加速Java程序的執行速度。 .class文件中保存的並不是機器碼而只是二進制代碼,需要先進行解釋,JIT在運行時會把翻譯過的

原创 LeetCode之Projection Area of 3D Shapes(Kotlin)

問題: On a N * N grid, we place some 1 * 1 * 1 cubes that are axis-aligned with the x, y, and z axes. Each value v = g

原创 LeetCode之Increasing Order Search Tree(Kotlin)

問題: Given a tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree,

原创 LeetCode之Reveal Cards In Increasing Order(Kotlin)

問題: In a deck of cards, every card has a unique integer. You can order the deck in any order you want. Initially, a

原创 LeetCode之DI String Match(Kotlin)

問題: Given a string S that only contains “I” (increase) or “D” (decrease), let N = S.length. Return any permutation A

原创 LeetCode之Delete Columns to Make Sorted(Kotlin)

問題: We are given an array A of N lowercase letter strings, all of the same length. Now, we may choose any set of del

原创 LeetCode之Range Sum of BST(Kotlin)

問題: Given the root node of a binary search tree, return the sum of values of all nodes with value between L and R (i

原创 LeetCode之Minimum Add to Make Parentheses Valid(Kotlin)

問題: Given a string S of ‘(’ and ‘)’ parentheses, we add the minimum number of parentheses ( ‘(’ or ‘)’, and in any p

原创 LeetCode之Unique Email Addresses(Kotlin)

問題: Every email consists of a local name and a domain name, separated by the @ sign. For example, in alice@leetcode.

原创 LeetCode之Middle of the Linked List(Kotlin)

問題: Given a non-empty, singly linked list with head node head, return a middle node of linked list. If there are two

原创 LeetCode之Insert into a Binary Search Tree(Kotlin)

問題: Given the root node of a binary search tree (BST) and a value to be inserted into the tree, insert the value int

原创 LeetCode之Sort Array By Parity II(Kotlin)

問題: Given an array A of non-negative integers, half of the integers in A are odd, and half of the integers are even.