In the development, often encounter this situation, open an activity, the first text box automatically get focus, and will pop up the soft keyboard input box, which greatly affect the user experience, now look at the solution.Let's see why this is the case, the reason is very simple, the text box will be the focus of the default, after the focus will continue to pop up the input box, waiting for input, for this reason, we can have the following two scenarios:1, do not let the text box to get foc
1. Create a new class that inherits Broadcastreceive Public class extends Broadcastreceiver { public startboot () { } @Override public void OnReceive (Context context, Intent Intent) { new Intent (context,mainactivity. Class);// Intent2.setflags (intent.flag_activity_new_task);// context . StartActivity (Intent2); }}2. Modify Androidmanifest.xml receiverAndroid:name=". Startboot "> Intent-filter> ActionAndroid:name=
When doing a mobile phone adaptation, encountered a very strange problem, in 1080x720 's phone can display the replacement ic_launcher.png icon, but in 1920x1080 's phone display ic_ Launcher.png is still the default icon, and after checking that it does not include the default Ic_launcher.png icon throughout the project, what is the icon displayed?The first possibility of Baidu, found the same problem others have encountered, they are directly replaced by the default Ic_launcher.png icon, re-in
Supports thawing and freezing apps
Support to hide specified app in the app list
Support detection system core app to prevent delayed freezing causing cell phone to become brick
Support Cleanup App Cache
Support Force Stop App
APK file is only 47KB
Personal, open source
Similar to App:app quarantine, black and white doors, refrigerator Ice box, etc.version: v160119.04.03.045 Updated:2016/01/19 (file size: 47KB) + First release versionversion: v151231.03.01.035 Updated:2015/12
Locate the Iconcache in launcher to store the package name to be modified and the icon to be modified.Private string[] ClassName = {"Com.google.android.apps.maps", "Com.google.android.googlequicksearchbox"};Private int[] ResId = {R.drawable.com_android_google_map,r.drawable.com_android_googlesearch};Add the following code in the Cachelocked methodif (Systemproperties.getboolean ("persist.sys.ts18.sp025", false)) {Resources res = mcontext.getresources
Modifies the size of Apps_customize_cell_width and apps_customize_cell_height in Launcher2/res/value/dimens.xml. How much value is appropriate and requires a combination of code.Pagedviewcelllayout Estimatecellhspan and Estimatecellvspan get the return value N (n is the column and row for the number of cells per screen).Take Estimatecellvspan as an example, int n = Math.max (1, (availheight + mheightgap)/(Mcellheight + mheightgap));Availheight is available height, availheight = Estimatecellvspan
Objectivewelcome everyone I share and recommend useful code Snippets ~ ~StatementWelcome reprint, but please keep the original source of the article:CSDN:http://www.csdn.netrainy season o mo away:http://blog.csdn.net/luckkofBodyKK Launcher3 Wallpaper display is dynamic, related to the number of launcher preset desktop, let the wallpaper center, only to ensure that the first time the wallpaper center, after the user modified the number of desktops, wil
, in onmeasure, You can naturally see that when you measure the size of each child, the set method is also called for it. As follows:
Int COUNT = getchildcount (); log. V (TAG, "onmeasure start... "); For (INT I = 0; I
At this point, we have finished introducing the child's painting work on celllayout. But we have not mentioned how to add the selected item to the desktop when we press the desktop for a long time. You have to go back to the onlongclick method of
You should be familiar with launcher's desktop slide. The best experience should be that you can display the desktop in different locations as your fingers slide,
It is much better than the gesture switching page implemented by viewflinger + animation ~~~~
After analyzing the workspace in the launcher, there is too much code to use (drag, hold ,,,), remove the redundant code in it to achieve the necessary sliding switching screen ....
Create a new s
The wallpaper display of KK Launcher3 is dynamic, which is related to the preset number of Launcher desktops. to center the wallpaper, you can only ensure that the wallpaper is centered during the first boot. After you modify the number of desktops, the wallpaper cannot be reached. To center the default number of desktops, refer to the following method. Take the default screen as an example: Replace the following function private void updateOffset (bo
Launcherapplication-> oncreate-- 1. // set the minimum heap memory to 4 MB-- 2. // create an application Icon cache-- 3. // create launchermodel-- 4. // register intent. action_package_added, intent. action_package_removed, intent. action_package_changed event listenerLaunchermodel listens to events in the preceding 3 as a broadcast Receiver-- 5. // Add a Data Change listener to the desktop favorites content provider2 launcher-> oncreate-- 1. Get the
The app icons on the Android main interface have different styles. To make the user look more unified, you have to set a unified background for the icons.
In ApplicationPackageManager. java, there is a public Drawable getDrawable (String packageName, int resid, ApplicationInfo appInfo) method used to return the application icon. Therefore, we can process the icons after parsing and put them in the cache to make them the desired effect.
// Icon: applic
Ext.: http://m.blog.csdn.net/blog/shift_wwx_2010/9225951••••••••••••••••••••••••••••••••••••••••••••••••••••••••Foreword: This article reference more information, I think this launcher mode is more key, I will try to perfect and perfect.Launchmode plays an important role in the process of multiple activity jumps, it can decide whether to generate new activity instances, whether to reuse existing activity instances, and whether to share a task with oth
the child control sends to it, the quilt control is blocked. (This is to deepen the memory. These two events are so troublesome to understand. Let alone remember, I must have forgotten them all at once. ^ 0 ^)
(Note: Do you think it is related to consumption? Anyway, I have compiled the processing code for the event? The answer is yes! For example, the premise that ACTION_MOVE or ACTION_UP occurs is that ACTION_DOWN has occurred. If you have not consumed ACTION_DOWN, the system will think that
Let's briefly talk about the principle of widgets. Widgets are a piece of information displayed on the desktop. You can also click widgets to jump to a program. The system comes with a program. The typical widget is music. This android built-in music playing applet. This is a typical widget + app application. A program can be started either through a widget or through an app. Widget is an appwidgetprovider + UI interface display (a lot of intent is pr
The most appealing thing about Android phones is its open source and the pleasure of other third-party apps. Experimenting with windows on Android phones is an exploration project for some mobile enthusiasts, whether remotely controlled or virtual, and there is a new way to do it. Today's small series to introduce a copy of the Desktop XP desktop software XP Mod Launche
Sometimes, for launcher development, you need to remove the search box and protipwidget on the launcher. In addition, protipwidget is added after Android 2.2. After searching for N for a long time, the original definition file is in launcher2/RES/XML/default_workspace.xml, and the file is pasted below:
Then,
These two are the search box we are looking for and
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.