Android video playback (3)

Package CN. c; import Java. io. file; import android. app. activity; import android. content. intent; import android.net. uri; import android. OS. bundle; import android. OS. environment; import android. view. view; import android. widget. button;

Android uses the cache mechanism to download files

When downloading an object or browsing an object online, or to ensure the correctness of the object download, a cache mechanism is required. SoftReference is often used. SoftReference is characterized by a soft reference of a Java object saved by an

Android uses a camera to take photos

// Main. XML is as follows: // mainactivity is as follows: Package COM. bravesoft; import Java. io. file; import Java. io. fileoutputstream; Im Port android. app. activity; import android. graphics. bitmap; import android. graphics. bitmap.

Android: View webpage source code

1 Layout You can embed a TextView in the ScrollView control with a scroll bar. 2. The webpage path and encoding method are used to obtain the byte array of the webpage. public class GetPageResource { public static String getHtml(String

Android screen Switching

In the Android simulator, the shortcut key "Ctrl + F11/F12" can be used to screen a very simple Activity: package cn.sohu.com; import android. app. activity; import android. OS. bundle; import android. util. log; public class TestActivityActivity

Android GridView example (1)

1 The main. xml file is as follows : the overall layout is a linear vertical layout, A textview followed by a gridview, which is similar to listview 2 grid_row.xml as follows: note: the overall layout is a horizontal linear layout. The

Android Local Service

// The service is in the same process as the visitor, so it is called the local service // Visitor: package cn.com. localquery; import cn.com. service. ILocalQuery; import cn.com. service. localQueryService; import android. app. activity; import

Implementation of Android drawer (s0000ingdrawer)

MainActivity is as follows: Package c. c; import android. app. activity; import android. OS. bundle; import android. widget. slidingDrawer; import android. widget. slidingDrawer. onDrawerCloseListener; import android. widget. slidingDrawer.

Android gesture operation (1)

Mainactivity is as follows: Package cn. c; import java. io. file; import java. util. arrayList; import java. util. set; import android. app. activity; import android. gesture. gesture; import android. gesture. gestureLibraries; import android.

Android GridView example (2)

MainActivity is as follows: Package CN. c; import Java. util. arraylist; import android. app. activity; import android. OS. bundle; import android. view. view; import android. view. view. onclicklistener; import android. widget. adapterview; import

Android allows you to click non-local images.

MainActivity is as follows: Package cn. c; import android. app. activity; import android. OS. bundle; import android. view. motionEvent; import android. view. view; import android. view. view. onTouchListener; import android. widget. imageView;/***

Android finger drawing (2)

package cn.c;import android.app.Activity;import android.graphics.Bitmap;import android.graphics.Canvas;import android.graphics.Color;import android.graphics.Paint;import android.os.Bundle;import android.view.Display;import

Android gesture operation (2)

MainActivity is as follows: Package cn. c; import java. io. file; import java. util. arrayList; import android. app. activity; import android. gesture. gesture; import android. gesture. gestureLibraries; import android. gesture. gestureLibrary;

Android finger plotting (1)

Package cn. c; import java. io. outputStream; import android. app. activity; import android. content. intent; import android. graphics. bitmap; import android. graphics. bitmap. compressFormat; import android. graphics. bitmapFactory; import android.

Android video playback (4)

Package cn. c; import java. io. file; import android. app. activity; import android. content. intent; import android.net. uri; import android. OS. bundle; import android. OS. environment; import android. view. view; import android. widget. button;

Android gesture operation (3)

MainActivity is as follows: Package cn. c; import java. io. file; import java. util. arrayList; import java. util. set; import android. app. activity; import android. gesture. gesture; import android. gesture. gestureLibraries; import android.

Android video playback (2)

Package cn. c; import java. io. file; import java. io. IOException; import android. app. activity; import android. media. mediaPlayer; import android. media. mediaPlayer. onCompletionListener; import android. media. mediaPlayer. onErrorListener;

AsyncTask instance in Android

Mainactivity is as follows: Package com. example. asynctasktest; import java. io. byteArrayOutputStream; import java. io. inputStream; import org. apache. http. httpEntity; import org. apache. http. httpResponse; import org. apache. http. httpStatus;

Android Touch event Transfer Mechanism

Mainactivity is as follows: Package cn. c; import android. OS. bundle; import android. app. activity; import android. view. menu; // The first test // The output result is as follows: // call onInterceptTouchEvent () in MyFrameLayout //

Android video playback (1)

Package cn. c; import java. io. file; import android. app. activity; import android. media. mediaPlayer; import android. media. mediaPlayer. onCompletionListener; import android. media. mediaPlayer. onErrorListener; import android. media.

Total Pages: 2775 1 .... 472 473 474 475 476 .... 2775 Go to: GO

Alibaba Cloud 10 Year Anniversary

With You, We are Shaping a Digital World, 2009-2019

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

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.