Display and hide when entering a password for Android
When logging on or registering, some software requires a password to be viewed and hidden, which is easy to implement.
First, define the layout:
Then listen to the button. In java code, define a tag
Private Boolean showPassword = false; if (showPassword) {// display password showPassword =! ShowPassword; login_s
Hide EditText pop-up soft keyboard input (softinput)This address: Http://blog.csdn.net/caroline_wendykeep the interface neat, can choose to enter the interface, the hidden edittext control of the soft keyboard , when the click EditView, and then pop;The ability to add a property to the activity in which TextView is located:Android:windowsoftinputmode= "Statehidden|adjustresize"indicates: The input mode of the soft keyboard is Statehidden (hidden State
Class
Note Add the appropriate permission:
Add a code that uses Java reflection to parse APK package information on the Web:
ref:http://blog.csdn.net/sodino/article/details/6215224//using the reflection mechanism to invoke the Android @hide API to resolve public static void
Extractapkinfoext (string apkpath, Downloadtask Task) {string path_packageparser = "Android.content.pm.PackageParser";
In the development of Android encountered problems in the solution, online search methods have some problems, so the following methods are usedMethod/Step
Add ID to activity layout fileXmlns:tools= "Http://schemas.android.com/tools"Android:layout_width= "Fill_parent"android:layout_height= "Fill_parent"android:scrollbars= "Vertical"Android:id= "@+id/activity_main">
Listen to events in the same way as normal controls.Activity_main= (LinearLayout
have declared a minheight and you use the this flag, your view would only enter at its minimum height (i.e., ' C Ollapsed '), only re-expanding to its full height when the scrolling view has reached it ' s top.
exitUntilCollapsed: This flag causes the view to scroll off until it was ' collapsed ' (its minheight) before exiting
The examples above are scroll and enteralways.Scroll indicates that when scrolling down, the view is scrolled out of the screen until it is hidden.Enteralways in
To hide the virtual keys under Android, you can do this by[CPP]View PlainCopy
ADB root
ADB remount
ADB shell ls-al/system/build.prop (view file permissions)
-rw-r--r--root root 4237 2015-11-19 04:34 build.prop
ADB shell Pull/system/build.prop./(Take the file out and modify it)
Gedit Build.prop
Qemu.hw.mainkeys=1 //Plus this definition, equivalent to turning off the virtual k
1, implement method one: By setting the Click event to the parent layout file of the current interface (equivalent to setting a click event for the entire activity), the keyboard is hidden in the event[Java]View Plaincopy
"Http://schemas.android.com/apk/res/android"
android:id="@+id/traceroute_rootview"
Android:layout_width="Fill_parent"
android:layout_height="Fill_parent"
android:background="@color/white"
android:clickable="true"
andr
In Activity2 popped out soft keyboard, click Back, enter Activity1, inside also have edittext, such words soft keyboard still will show there, sometimes quite influence experience.You can add such a method to the return event:Private void Closesoftinput () { = (Inputmethodmanager) Getsystemservice (context.input_method_service); if (Imm.isactive ()) { // Toggle on/off status. tags can be replaced with imm.togglesoftinput (inputmethodmanger.show_forced, Inputmethodmanager.
1, implement method one: By setting the Click event to the parent layout file of the current interface (equivalent to setting a click event for the entire activity), the keyboard is hidden in the event1 LinearLayoutxmlns:android= "Http://schemas.android.com/apk/res/android"2 Android:id= "@+id/traceroute_rootview"3 Android:layout_width= "Fill_parent"4 Android:layout_height= "Fill_parent"5 Android:background= "@color/white"6 android:clickable= "true"7 a
Originally was idle to have nothing to do, browse the blog, see the browser address to open the app's article,After attempting to do so, I find that the app icon is not displayed on the desktop.Just modify it in the code below. intent-filter> action android:name="Android.intent.action.MAIN" /> category android:name="Android.intent.category.LAUNCHER" /> data android:scheme="MyApp" android:host="Akm.app" Android:pathprefix="/openwith"/> in
Get wifi ip address or mobile network IP address for android development tools
Sometimes we need to get the IP address of WIFI to get the IP address of the mobile phone network. This is a tool class dedicated to solving this problem. Here we need two permissions:
Hello everyone, let's talk about some methods for Android to obtain IP addresses. In our development, we have determined whether the mobile phone is connected to the Internet or whether we want to obtain the IP address of the current mobile phone, of course, the sum of Wi-Fi connections
The IP addresses of our 3g cards
Android Get IP Address
Recently done project, there is a demand is the Android device to obtain the current IP function, after a query to solve the data, record the implementation method.
1. Using WiFi
Set user Permissions First
Second, the code is as follows
public void OnCreate (Bundle savedi
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.