MMS portal analysis:
The two most important activities in MMS are:Conversationlist(SMS list), the other isComposemessageactivity(Single conversation or text message ). Each composemessageactivity record belongs to a conversation or does not belong to any conversation (no recipient draft). Each converation is distinguished by an independent threadid. Each converation has a unique workingmessage indicating that this is under thread. The launch mode of conversationlist and composemessageactivity is
We often do the custom control, some of the controls need to be displayed together, the display text will definitely use the DrawText method, and DrawText (str, x, y, paint) has two parameters x and y is the coordinates of the drawing, we must determine the coordinates, To know where to draw, sometimes we draw a string, and want to re-draw after the string, we need to retrieve the drawing coordinates, this time the first thought is to get the previous string drawing width + The previous string's
, R.drawable.ic_launcher, R.drawable.ic_ Launcher);Where Imgview is the control that displays the picture, and the next two parameters are the pictures displayed during the download of the picture and the picture that the download failed to display, here for the sake of simplicity, the same picture is set.Finally, use the Get () method of Imageloader to download the picture. Imageloader.get ("Http://tech.cnr.cn/techit/201411/W020141113510671880058.jpg", 400,
IntroductionApp optimized memory optimization (order) as a small part of memory optimization in the app optimization series.Due to the relatively jerky memory-related knowledge, memory optimization used in the relevant tools, there are many proper nouns. There is a theoretical understanding of Java memory Management, GC, Android memory management, Dalvik/art and other knowledge that allows us to better use these tools to analyze memory problems.So let
from the server side into a string*/ Public Staticstring Sendpostmessage (String path,string jsonstr) {string result= ""; HttpClient HttpClient=Newdefaulthttpclient (); Try{httppost HttpPost=Newhttppost (path); Httppost.addheader ("Content-type", "Text/json"); Httppost.setentity (Newstringentity (JSONSTR)); HttpResponse HttpResponse=Httpclient.execute (HttpPost); if(Httpresponse.getstatusline (). Getstatuscode () = =HTTPSTATUS.SC_OK) {//log.e ("json+++++2:", jsonstr); Log info for debugHttp
parameter, a string parameter, in the Myactivity.java code as follows:
Intent Intent = new Intent ();Intent.setclass (Myactivity.this, Nextactivity.class);Bundle bundle = new bundle ();Double height = 1.74;String name = "Li Lei";Bundle.putdouble ("height", height);Bundle.putstring ("name", name);Intent.putextras (bundle);StartActivity (Intent);
If one party sends a parameter, one must receive the parameter. Its reception is also very simple to implement, in Nextactivi
Android Optimization-UI optimization (3)UseViewStubDelayed Loading
1.
ViewStubDelayed Loading
ViewStub is an invisible View with a size of 0. The best use is to implement delayed loading of the View and load the View as needed, the common performance optimization methods in Java are the same for delayed loading.When the setVisibility function of ViewStub is cal
Timepicker (Time picker)
Method
Describe
Integer Getcurrenthour ()
Returns the hour of the current setting
Integer Getcurrentminute ()
Returns the current set of minutes
Boolean Is24hourview ()
Determine if it is a 24-hour system
void Setcurrenthour (Integer currenthour)
Set the current number of hours
void Setcurrentminute (Integer currentminute)
Set the current minute
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.