2014 easy-to-use open source Android test tools-open source China community
There is a big trend to move to mobile application platform, Android is the most widely used mobile operating system, more than 2014 years accounted for more than 80% of the market. When developing Android apps for testing, there are a lot
Player. xml and objectactivity are the most important items in this project.
The first is the layout of the player control. At first, I tried to use various la s to achieve the effect I wanted, because the progress display I used is a custom seekbar, it seems that it will leave a certain margin in the upper and lower by default, so I had to use the absolute layout at last, because the player size is fixed
Simple use of EventBus Android EventBus and eventbus Android EventBus
The basic steps are as follows. Click this link to view the example and introduction.
Define the event type:'Public class MyEvent {}'
Define event handling methods:'Public void oneventmainthread'
Subscriber registration:'Eventbus. getDefault (). register (this )'
Send event:'Eventbus. getD
){// --- Use an Intent object to return data ---Intent I = new Intent ();
// --- Use the putExtra () method to return some// Value ---I. putExtra ("age3", 45 );
// --- Use the setData () method to return some value ---I. setData (Uri. parse ("Something passed back to main activity "));
// --- Set the result with OK and the Intent object ---SetResult (RESULT_ OK,
Android official has provided a variety of fragment use of demo examples, in our SDK below the API demo contains a variety of fragment use examples, need to see the demo friend, directly to see the API demo that program on it, not everywhere to find. It separates different functions and implements different classes of
Today to explain the fragment control, mainl
some reason, then when the dismiss WindowManager check that the activity that dialog belongs to does not exist, it will report
Illegalargumentexception:view not attached to window manager.
One important reason for this type of exception is that both the ProgressDialog creation display and cancellation allow processes in non-UI threads. In Android, non-UI threads are not allowed to manipulate UI-related things, such as adding a remove view, but are yo
picture pixel configuration is inconsistent, the system will automatically adjust the display effect, about picture pixel problem see Android development of the bitmap two sampling articles; filter indicates whether the filter effect is turned on. This property is also for the image to be magnified or reduced when there is a better display effect; The Gravity property indicates that when the size of the picture is smaller than the size of the control
Android provides a large number of UI controls, and this article describes how to use TextView, ImageView, Button, EditView, ProgressBar, SeekBar, ScrollView, WebView. Before introducing the various controls, let's briefly introduce the most basic properties of the Android UI control:
Id:id is a unique identifier for a control that can be manipulated by **findvi
We know that one of the things that we often need to use when writing Java code is the dialog box (Dialog), for example, we write the program, others in use, we need to give users some hints, and these tips if always in the form of the window to play out inevitably more trouble, but also increased the burden on the programmer, But a lot of people don't know much about the pop-up and
Android development and learning-use EventBus, android-eventbus
EventBus is a tool that transfers messages between components by publishing and subscribing to events.
It aims to optimize the process of passing messages between components. Traditional methods for transmitting messages between components include broadcast and callback, which are complicated to
Tags: what request is download file Hub oid Way method file Download Async
This article covers the following topics:
What is OKHTTP3?
Demo of the OKHTTP3 Tool class (package based on the Okhttp tool class)
OKHTTP3 Packaging for Tool classes
Use the exact words of the author's project: HTTP and HTTP/2 clients for Android and Java applicationsIts Project address: https
Generally we are using android:xxx= "" ... The properties of such Android. But sometimes we need to use custom properties, especially when customizing the view.The following steps are generally required:1. define a attrs.xml file under the res/values file:2. Rewrite Our custom view construction method. is to useR.styleable.myview Get our custom properties. TypedArray usually last called . Recycle () method
if this file has been generated
LS Sdcard/love_world_.trace
Ctrl + C exits adb shell mode2 Exporting trace files
ADB pull Sdcard/love_world_.trace
Iv. Opening trace filesOpening the trace file requires Android to provide the Traceview.bat tool, the directory where the tool is located: Sdk\tools\traceview.bat, which is performed in two ways:1) switch to this directory on the command line2) Add this directory to the system e
Android-shape is simple to use, Android-shape
Shape
Let's take a look at the built-in EditText and Button shapes.
The following figure shows the effect after adding a shape.
To put it simply, a shape can add a background border to the component, and a rounded corner can be used with selector.
ShapeXXX. xml is defined in the drawable directory.
The
The b
In Android, you can use timers to monitor time, the functionality of this class is to start the timer, stop timing, and then set the timer mode, the following list of the Timer method prototype: long getbase () ; // time to return to base, String GetFormat () set by SetBase (long), Returns the current string format, which is a void setbase (long base) implemented via SetFormat (); /Set time, va
R.id.nav_personal_info:
//do something break
;
...
}
return false;
}
});
At this point, the basic use of navigationview is almost done, the effect is the previous picture shows the effect.
The following is the use of the process encountered problems and solutions.
One, the menu icon color is rendered into other colors
Navigationview defaults to the
Use the exact words of the project: type-Safe HTTP client in Android and JavaProject Address: Https://github.com/square/retrofitHere retrofit also needs to import its Gson dependent library, because the returned data needs to be gson to handle1. Get request2. Post request3, single, multi-file uploadDemonstrates the provided interface (this interface does not support post mode)Get request (supports normal re
Use of SurfaceView in Android game development-android learning journey (5)SurfaceView and View
In the main ui thread, View directly responds to user operations and distributes tasks. However, complicated tasks may cause blocking.SurfaceView does not have this problem, so that it directly retrieves images from memory and so on. More importantly, SurfaceView can c
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.