新浪微博是全中国最主流,最具人气,当前最火爆的微博产品。用户可以测试当天的星座运情,并且可以分享到微博当中。
其他下载地址:
1.安卓星空网:http://www.starandroid.com/draft/2166babc-e3e6-412b-8b19-4586ef21abcf
项目地址:http://code.google.com/p/andengine/
RectangleExample源码:
package org.anddev.andengine.examples; import org.anddev.andengine.engine.Engine; import org.anddev.andengine.engine.camera.Camera; import org.anddev.andengine.engine.options.EngineOptions; import org.anddev.andengine.engine.options.EngineOptions.ScreenOrientation; import org.anddev.andengine.engine.options.resolutionpolicy.RatioResolutionPolicy; import org.anddev.andengine.entity.primitive.Rectangle; import org.anddev.andengine.entity.scene.Scene; import org.anddev.andengine.entity.scene.background.ColorBackground; import org.anddev.andengine.entity.util.FPSLogger; /** * @author Nicolas Gramlich * @since 11:54:51 - 03.04.2010 */ public class RectangleExample extends BaseExample { // =========================================================== // Constants // =========================================================== private static final int CAMERA_WIDTH = 720; private static final int CAMERA_HEIGHT = 480; // =========================================================== // Fields // =========================================================== private Camera mCamera; // =========================================================== // Constructors // =========================================================== // =========================================================== // Getter & Setter // =========================================================== // =========================================================== // Methods for/from SuperClass/Interfaces // =========================================================== @Override public Engine onLoadEngine() { this.mCamera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT); return new Engine(new EngineOptions(true, ScreenOrientation.LANDSCAPE, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), this.mCamera)); } @Override public void onLoadResources() { } @Override public Scene onLoadScene() { this.mEngine.registerUpdateHandler(new FPSLogger()); final Scene scene = new Scene(1); scene.setBackground(new ColorBackground(0, 0, 0)); final Rectangle rect1 = new Rectangle(180, 60, 180, 180); rect1.setColor(1, 0, 0); final Rectangle rect2 = new Rectangle(360, 60, 180, 180); rect2.setColor(0, 1, 0); final Rectangle rect3 = new Rectangle(180, 240, 180, 180); rect3.setColor(0, 0, 1); final Rectangle rect4 = new Rectangle(360, 240, 180, 180); rect4.setColor(1, 1, 0); scene.getTopLayer().addEntity(rect1); scene.getTopLayer().addEntity(rect2); scene.getTopLayer().addEntity(rect3); scene.getTopLayer().addEntity(rect4); return scene; } @Override public void onLoadComplete() { } // =========================================================== // Methods // =========================================================== // =========================================================== // Inner and Anonymous Classes // =========================================================== }
RectangleExample的内容和LineExample几乎相同,画Line和画Rectangle的方法和类似的图形画法在以后的文章里面总结一次,暂时不作过多记录。
- NEAREST: Faster then BILINEAR as only the nearest pixel on the Texture is used (Sprites tend to look pixelated when, physical resolution is higher or lower than texture resolution. Up/Down-scaling)
- BILINEAR: Slower than NEAREST, but looks better, as not only one pixel from the texture is fetched but the 4 nearest.
The difference between those and the REPEATING TextureOptions is the way OpenGL treats TextureCoordinates that are out of the physical bounds of the Texture (usually ranging from 0.0 to 1.0).
Where REPEATING paints the Texture twice when the coordinates go from 0.0 to 2.0, NON-REPEATING will stretch the outermost pixel of the Texture what looks pretty ugly.
So the REPEATING TextureOptions are used only in very special cases.
Iterator itOfSys=hashSetOfSys.iterator(); Iterator itOfSelf=hashSetOfSys.iterator(); while(itOfSys.hasNext())//Iterator与cursor一样的读取模式 { Object objectOfSys =itOfSys.next(); while(itOfSelf.hasNext()) { Object objectOfSelf = itOfSelf.next(); if(objectOfSys.equals(objectOfSelf))//匹配到了,如果系统的包含自己的,说明不需要改变 { break; } else//没有匹配到,说明系统有的,我们没有,需要被添加 { listToBeAdd.add(objectOfSys); } objectOfSelf = null; } objectOfSys = null; }