. The corresponding code in the Secondactivity page is as follows: Intent intent = new Intent(); intent.putExtra("num""123"); finish(); setResult(RESULT_OK, intent);
RESULT_OK is the result code, and when the returned intent parameter is received, the callback method Onactivityresult provides the result code to correctly identify the result and determine how to handle it.
3. After returning to the first page, the corresponding code is as follows:@OverrideprotectedvoidonActivity
precision.Xp==> the smallest unit of the image, pixels (pixels). Different devices show the same effect, generally we hvga represent 320x480 pixels, this use more;Pt==> Point, is a standard length unit, 1pt=1/72 inches, for printing, very simple to use;sp:scaled pixels (enlarge pixels). Mainly used for font display best for TEXTSIZEIn (inches) ==> length units;MM (mm) ==> length unit;Resolution ==> refers to the total screen is how many points, eg:800*480, it is for the software to display unit
Android game Screen class Testscreen and game class androidgame design1. Basic knowledge:A. WakeLockhttp://developer.android.com/reference/android/os/PowerManager.WakeLock.htmlB. requestwindowfeaturehttp://developer.android.com/reference/android/app/Activity.html#requestWind
job is to choose the game engine, for my network game positioning is 2D network game, all I choose and concern is 2D game engine, I mainly focus on two game engine, one is COCOS2DX, Another is Andengine, where COCOS2DX is a C + + development of the cross-platform
= "Textlongmessage"-- Long message formatAndroid:inputtype= "Textpersonname"-- name formatAndroid:inputtype= "Textpostaladdress"-- postal formatAndroid:inputtype= "Textpassword"-- password formatAndroid:inputtype= "Textvisiblepassword"-- password visible formatAndroid:inputtype= "Textwebedittext"-- text format as a Web FormAndroid:inputtype= "TextFilter"-- text filter formatAndroid:inputtype= "Textphonetic"-- Pinyin input formatAndroid:inputtype= "Number"-- digital formatAndroid:inputtype= "numb
Android audio and video goes deep into 18 FFmpeg to play videos with sound (source code download) and androidffmpeg
Project addressHttps://github.com/979451341/AudioVideoStudyCodeTwo/tree/master/FFmpegv%E6%92%AD%E6%94%BE%E8%A7%86%E9%A2%91%E6%9C%89%E5%A3%B0%E9%9F%B3%EF%BC%8C%E6%9A%82%E5%81%9C%EF%BC%8C%E9%87%8A%E6%94%BE%E3%80%81%E5%BF% AB %E8%BF%9B%E3%80%81%E9%80%80%E5%90%8EThis project was written by the sim
In the process of Android development, we often need to change the style of the control, can be used to add a background image of the way to change, but the background image is more and more certainly will make the apk file very large.We can do this with our own definition of the attribute shape.Shapegradient--the corresponding color gradient.StartColor, EndColor will not say much. android:angle refers to the angle from which the change begins. Solid
In the process of Android development, we often need to change the style of the control, can be used to increase the background image of the way to change, but the background image is more and more certainly will make the apk file greatly.We can do that with a custom attribute shape.Shapegradient--corresponds to the color gradient.StartColor, EndColor will not say much. android:angle refers to the angle from which the change begins. Solid--fill.Strok
This article mainly introduces the last encounter of some machines do not see the video problem, the article from the blog Park Rtc.blacker, reproduced please indicate the source.Before doing the video chat app has been running well, a few days ago customer feedback said in Samsung 9100. You can't see your own image on the Android4.0.3.After a search to find the WEBRTC is the bottom of the bug, has been repaired and feedback to the community, the following main analysis of the cause of the bug a
1, first create a bitmap picture, and specify the size;2. Create a new canvas on the picture, then draw it on the canvas and save it;3, need to save the directory file, note if the write directory such as "/sdcard/song/" if not exist, you must first create (File.mkdirs).4, need to add permissions: Canvas is a canvas, you can create a blank canvas, just new one canvas object, no parameters required. You can also use Bitmapfactory to create a bitmap object, as a new canvas object parameter, that i
1, first create a bitmap picture, and specify the size;2. Create a new canvas on the picture, then draw it on the canvas and save it;3, need to save the directory file, note if the write directory such as "/sdcard/song/" if not exist, you must first create (File.mkdirs).4, need to add permissions: Canvas is a canvas, you can create a blank canvas, just new one canvas object, no parameters required. You can also use Bitmapfactory to create a bitmap object, as a new canvas object parameter, that i
Today, I want to systematically learn about android games and prepare to study the libgdx engine.
I. Causal Games (casual Games)
Probably the biggest segment of games on the Android Market consists of so-called
Causal games. So what exactly is a causal game? That question has no concrete
Answer, but causal games share a few common traits. Usually, they feature
Libgdx Overview
Libgdx is a cross-platform 2D/3D Game Development Framework written in Java/C ++. It is based on the Apache license and Version 2.0 protocol and is free for commercial and non-commercial use.
Libgdx is compatible with windows, Linux, Max OS X, Java Applet, JavaScript/webgl, and Android [4] (version 1.5 +) platforms. The support for the Android pla
Generally, the basic framework of game development includes the following modules:
Window Management: This module creates, runs, pauses, and restores game interfaces on the Android platform.
Input: This module is closely related to the Windows Management Module and is used to monitor and track user input (such as touch events, button events, and accelerator e
Starting point:Traditional game simulators (FC, Neo, FBA, GBA, Mame, n64, NDS, and PSP) are all moved to Android phones, the game Rom is then saved to the SD card and run through the simulator. However, considering that mobile games must follow the fast forward and fast forward principles, I have implemented the following micro-innovations on this basis:
1. direc
Many new android game developers tend to be confused, and they often do not know where to start. Whenever they encounter problems that they cannot solve, and often will envy iPhone under a free game engine such as Cocos2d-iphone can be used, while self abandon complaints Android platform
Today, I will explain how to implement switching between two or more activities and data interaction in Surfaceview. I have provided a demo of the game logon interface to improve my image, I also wrote the layout of the input interface at will, mainly because the function does not take time to beautify, so you can change the layout in xml or code by yourself, the width and height of each widget. Okay, next (I love it ~ Doraemon, so I have to use the f
Li huaming himiOriginal, reprinted must be explicitly noted:Reprinted from[Heimi gamedev block]Link: http://www.himigame.com/android-game/301.html
Many kids shoes say that after my code is run, clicking home or back will cause a program exception. If you have encountered this, you certainly haven't carefully read the himi blog, in article 19th, himi specifically wrote about the causes and solutions of th
Li huaming himiOriginal, reprinted must be explicitly noted:Reprinted from[Heimi gamedev block]Link: http://www.himigame.com/android-game/384.html
,
This chapter is part of the game development book being created. It has not been updated for a long time due to the writing of the book. Sorry, I am sorry for everyone. So let's release a part of the book today and
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.