Path to Android Development 7-UI component 2
Today, we continue to learn about the UI components, mainly including TextView and EditText.
TextView component introduction:
Subclass:
Button, CheckdTextView, Cheronometer, DigitalClock, EditText
Indirect subclass:
AutoCompleteTextView, CheckBox, CommpoundButton, MultiAutoCompleteTextView
In its xml file, there are many attributes mentioned today, for example:
() { public voidint which) { Dialog.dismiss (); } }). Setnegativebutton (null). Show ();6. Information content is a set of simple list itemsThe method code to create the dialog is as follows:New Alertdialog.builder (this). Settitle ("list box"). Setitems ( newnull). Setnegativebutton ( null). Show ();7. Information content is a custom layoutDialog layout file code is as follows:XML version= "1.0" encoding= "Utf-8"?>
:?
12345678
new AlertDialog.Builder(this).setTitle("单选框").setIcon( android.R.drawable.ic_dialog_info).setSingleChoiceItems( new String[] { "Item1", "Item2" }, 0, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }).setNegativeButton("取消", null).show();
6. Information content is a set of simple list itemsThe method code to create the dialog is as f
Although Android provides us with a number of components, but not very convenient to use, we developed the APK have their own style, if the use of the system self-contained components, always feel and the application of the theme is irrelevant and does not look good, then we need to customize, In order to facilitate the learning of custom components, I have prepared several dialog articles on customization,
Laidian Butler for android projects (7) and android butler
Because we use SharedPreferences to store user setting information, some default settings will be made when we first enter the telephone Butler, and the content of the Setting information file will be updated based on the user's settings.
To open the application, start ActivityGroupDemo and display the bl
Studio using tutorial (i)Using the Android Studio Tutorial (ii)How Android studio removes moduleHow to recover the module removed by Android StudioAndroid Studio always prompts to restart ADB solution!Android Studio for real machines and simulatorsWhere is the Android studi
Android: Daily Learning Notes (7) ——— Explore UI Development (4) UI Overview View and ViewGrou theall user interface elements in Android apps are View built using and ViewGroup objects . Viewobject is used to draw content on the screen that the user can interact with. ViewGroupobjects are used to store other View (and ViewGroup ) objects to define the layout of t
Qt on Android Episode 7)
In the last two articles on Qt on Android, I learned how to use the basic JNI and how to use external IDE to manage the Java part of the Qt application. In this chapter, we will continue to focus on how to expand the Java part of our Qt on Android Application and how to securely use JNI for in
the lower and upper elements have the same width and height, the upper element will completely overwrite the underlying element.(2) If the underlying element is large and the upper element is small, the upper element only partially covers the underlying element. Second, example-demo05framelayoutThis example shows a simple illustration of 3 layers:No. 0 Floor: img1.jpg1th Floor: img2.jpg2nd Floor: Img3.jpgEach time you click the next Layer button, the
Recently really a little confused, feel that there is no complete teaching system is difficult to go on, and some are their own blind, just as before, as the time of ACM, and then "This is a water problem violence on the line", "We enumerate all the state, find the law on the line", MMP yo.But!!!!!!!!!!!!!!!!!!!!!! B Station is omnipotent, there is no!!!!!!!!!!!!!!!!!!!!!A while ago in the Geek College saw a good Android teaching, I looked at the feel
A transitiondrawable is a special drawable object that can fade in and out between two drawable resources.
startTransition(). Backward, callreverseTransition().
The file is located:
res/drawable/filename.xml
File name as resource ID
Compilation Resource Type:
Point
TransitionDrawablePointer
Resource reference:
In Java:
R.drawable.filename
In XML:
@[package:]drawable/filename
Syntax:
drawable_resource" android:id="@[+][package:
The broadcast in 0.Android can be divided into two types, standard broadcast and ordered broadcast. Standard broadcast (normal broadcasts) is a fully asynchronous broadcast that, after broadcast, almost all broadcast receivers receive this broadcast message at the same time,An ordered broadcast (Ordered broadcasts) is a synchronous broadcast that, after a broadcast, only one broadcast receiver can receive t
Microsoft Windows [version 6.1.7601] Copyright (c) Microsoft Corporation. All rights reserved. D:\Android Anti-compilation Tool "full" \2016\dex2jar-2.0\dex2jar-2.0>d2j-dex2jar.bat classes.dex Dex2jar Classes.dex- >. \classes-dex2jar.jar com.googlecode.d2j.dexexception:not Support version. at Com.googlecode.d2j.reader.dexfilereader.) at Com.googlecode.d2j.reader.dexfilereader.) at Com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine (Dex
Android Development 7: simple data storage (using SharedPreferences) and file operations,Preface
La la ~ Hello, everyone. Meet again ~
This blog post describes how to complete a memorandum for registration and logon, learn basic usage of SharedPreferences, learn common file operations in Android, and review programming on the
1 Define the Options menu in the XML file:Create the Res/menu directory and add the XML file: Select New-Android xmlfiles. Select the menu file resource type;Open the new XML file, switch to XML edit view, and add a new Item element:XML version= "1.0" encoding= "Utf-8"?>Menuxmlns:android= "Http://schemas.android.com/apk/res/android" > item android:id= "@+id/menu
Alertdialog.builder (this). Settitle ("Radio Box"). SetIcon ( android. R.drawable.ic_dialog_info). Setsinglechoiceitems ( new string[] {"Item1", "Item2"}, 0, new Dialoginterface.onclicklistener () {public void OnClick (dialoginterface dialog, int which) { Dialog.dismiss (); } }). Setnegativebutton ("Cancel", null). Show ();
6. Information content is a set of simple list i
Blog migration-I have migrated my blog to www.ijavaboy.com to better manage it. We are sorry for the inconvenience caused by no updates! New address of this article: Click me
Originally, this article should still write the implementation principle of the item drag in launcher. However, since studying launcher, it has not been implemented before, and now it is all inspired. This is not the case. A month ago, I saw the well-known accounting software casually. I saw a cool statistical pie chart in
Android Database Expert secret (7)-experience the query art of LitePal
After studying many articles, we have mastered most of the content in LitePal. In retrospect, we have all learned the first three operations in addition, deletion, modification, and query. I don't know if you are using the database now. Do you feel extremely easy and simple. However, we all know that, among all database operations, quer
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.