这是一个简单的问题,但我无法在任何地方找到答案.我可以在Amazon Appstore上的应用程序中使用AdMob广告吗?如果没有,我可以使用哪些广告网络?
我开发了一款益智游戏.在我的游戏中,我有几个自定义视图,它们嵌套在FrameLayout中,就像图层一样.每个视图都显示一个位图.最大的位图是游戏板,大约占屏幕尺寸的2/3.FrameLayout下还有背景图像.
当用户触摸屏幕时,使用此游戏板视图执行简单的视图动画 - 它可以旋转或翻转.
这一切工作正常,在小屏幕上,但用户报告了Galaxy Tab的性能问题 - 有一个明显的滞后只是动画开始和动画本身不流畅了.(这些屏幕上的游戏板位图大小约为600*600px)
这是我的布局:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rootFrame"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/backgroundImageLayer"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/background"
android:scaleType="fitXY"/>
<FrameLayout android:id="@+id/gameFrame"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<com.mygame.BoardView
android:id="@+id/boardLayer"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
<com.mygame.SomeObjectView
android:id="@+id/someObjectLayer"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
<com.mygame.SomeOtherObjectView
android:id="@+id/someOtherObjectLayer"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</FrameLayout>
</FrameLayout>
Run Code Online (Sandbox Code Playgroud)
这是我的BoardView类.
public class BoardView extends View {
Bitmap b;
int x;
int y;
public BoardView(Context context, AttributeSet attrs) {
super(context, attrs);
// calculate size of the bitmap
b = Bitmap.createBitmap(sizeX, sizeY, Bitmap.Config.ARGB_4444);
createMyBitmap();
}
private void createMyBitmap() { …Run Code Online (Sandbox Code Playgroud) 在我的游戏中,我有 3 个活动:主菜单 -> 子菜单 -> 游戏屏幕。因此,当用户在游戏屏幕中玩游戏时,前两个活动处于非活动状态,但不会被销毁。
每个布局都有一个漂亮的背景图像。图像本身非常小(40k),但在大屏幕(比如 Galaxy 平板电脑)上,它占用了几兆内存。从前两个活动中去除背景后,第三个活动的内存使用量从 18M 下降到 13M!
有没有办法保留背景并恢复所有这些浪费的内存?
几天前我发布了我的应用程序的新版本2.2.然后我发现了一些小错误,并希望将固定版本上传到Market.但是这些错误并不重要,我不想惹恼那些已经下载了2.2版本并通知新版本的用户.
有没有办法做到这一点?
android ×4
admob ×1
ads ×1
amazon ×1
animation ×1
background ×1
google-play ×1
memory ×1
notify ×1
performance ×1
view ×1