representation in Mpandroidchart, they are independent of each other in their use, but they share the x axis (horizontal axis).For example, in this case, the red y vertical axis on the left represents a high-temperature polyline, and it has its own set of drawing mechanisms to run independently; in the same vein, the blue y vertical axis on the right represents a low-t
);
Draw minimum temperature mark
//minimum temperature if less than 10, display as 0x
String Mintempflag = mintemp
Draw the Rotate button
/**
* Draw rotation button
*
* @param canvas canvas
/private void DrawButton (canvas canvas) {
//button width high
int Buttonwidth = Buttonimage.getwidth ();
int buttonheight = Buttonimage.getheight ();
Button shadow width high
int buttonsha
This example describes the Android power information viewing method. Share to everyone for your reference. Specifically as follows:
1. Powertestactivity:
Import android.app.Activity;
Import Android.content.BroadcastReceiver;
Import Android.content.Context;
Import android.content.Intent;
Import Android.content.IntentFilter;
Import Android.os.BatteryManager;
Import Android.os.Bundle;
Import Android.os.PowerManager;
Import Android.view.View;
Import
[Android] View Source
Print?
/**
* Get Weather Forecasts (weather, temperature, wind power ...)
*/
public class MainActivity extendsActivity {
privatestatic final String NAMESPACE = "http://WebXml.com.cn/";
// What is next to the WebService address? The WSDL can be added or not added based on the address of
The Android custom TextView drawableTop icon is left aligned with the text (), and textview is left aligned
Public class DrawableTopLeftTextView extends TextView {private Paint mPaint; private float fFontHeight; private Drawable [] drawables; private int leftMargin = 40; // The TODO object must be obtained through code, public DrawableTopLeftTextView (Context con
Android-ViewPager: do not slide left (right) or left or right of viewpager
Because of the project requirements, it is required to select a sliding month, and sliding to the current month is prohibited to slide left to the next month, Baidu is disabled, most of the two-way sliding between the
Android anti-web page sliding switch between left and right, android anti-micro
You can see whether the Home Page switching effect is very dazzling, sliding switch, click the bar at the bottom to instantly switch, sliding switch gradient effect, online:
I have also seen other people's implementations on my blog. On the basis of this, I have made some optimizati
ListView Refresh Brush function believe that the ape friends who are engaged in Android development are not unfamiliar, including now Google Pro son swiperefreshlayout implementation in some apps can also be seen (but individuals do not like the official refresh effect). This article will lead some new Android friends or friends who love sharing to simple implementation of ListView Drop-down and
Android Gesture Recognition (sliding left and right) enables page switching and android gestures
Then let each specific interface inherit the baseactivity and implement the corresponding next or pre method. To display the effects, we define several animated effects: left-to-right or right-to-
use Scroller to implement the gorgeous ListView sliding Delete Item Effect Here's a little example of using scroller, At the same time can also be used to help the initial release of the reader more familiar with the use of scroller mastered the use of scroller, we can achieve a lot of sliding effect. For example, sideslip menu, Launcher,listview drop-down Refresh, and so on, I realized today is the ListView item's left and right sliding delete item
First, let's look at the running effect:
Program structure:
Code in the MainActivity file:Copy codeThe Code is as follows: package com. android. buttonpageflipper;Import android. app. Activity;Import android. graphics. PixelFormat;Import android. OS. Bundle;Import android
.getx ();
Float y = e2.gety ()-e1.gety ();
The limit must be 1/3 across the screen to calculate the float x_limit = SCREEN.WIDTHPIXELS/3;
float y_limit = SCREEN.HEIGHTPIXELS/3;
float X_abs = Math.Abs (x);
float y_abs = Math.Abs (y); if (x_abs >= y_abs) {//gesture left or right if (x > X_limit | | | x
Gestureutils.java
public class Gestureutils {
//Get screen size public
static Screens Getscreenpix (context
In the previous article to introduce you to the Android developer headlines (a) launch page implementation, interested friends can refer to.
Title: Bring you to achieve the developer's headline (ii) to implement the left-slide menu
Grammar_cjkruby:true
Starting today to mimic the developer headline sideslip menu, the second article in this series, I believe you have seen many apps using this sideslip.
: Call this method to display the previous view in framelayout.
View the source code of viewflipper. viewflipper is mainly used to automatically switch views. This class provides the following main methods.
Setfilpinterval: Set the view switching interval. The parameter is in milliseconds.
Startflipping: Start view switching. The interval is the number of intervals set in the preceding method. The switchover will be performed cyclically.
Stopflipping: Stop view switching.
Setautostart: Set wheth
This article is an example of how Android detects memory cards and the amount of space left in the phone. Share to everyone for your reference, specific as follows:
Android environment can be used to detect whether a phone has a memory card installed and a file storage path. Statfs can get the size of the memory card and the amount of space remaining. DecimalFor
This example shows how the picture is sliding around in Android.As for the sliding effect, which is used more in Android, the slide effect of this example is implemented using Viewflipper, and of course it can be implemented using other view. Then let's start to achieve this effect. For the sake of understanding, let's take a look at the effect chart:The main effect figure is as follows:Let's take a look at the program Structure chart: Mainactivity co
First up Effect chart:
This control is actually relatively lightweight, I believe many small partners can do it. Because the project encountered a number of special customization requirements, so I wrote one, here put it out.Let's first analyze the functionality of this control:• Ability to respond to left and right slides and to respond to fast sliding• There are different style expressions for selections and not selected items, such as foreground
PopupWindow can achieve the floating layer effect. The main methods are: You can customize the view, use the LayoutInflator method; you can display the animation when it appears or exits; you can specify the display position.
In order to present multiple functions of PopupWindow and implement them with simple code, a menu function pops up on the left of the click button is compiled, when the animation effect is displayed and exited, And the pop-up lay
Viewpager This small demo is to be able to loop around the picture, the following index, slide to the last page in the right slide will be the first page, the first page to the left slide to the last page, first on the effect of the picture:
1, first look at some layout under the XML
Use Viewpager first need to introduce Android-support-v4.jar this jar package, don't forget to add
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.