我想安装AndEngine ...我遇到了一些视频,告诉你如何安装它.但这些视频是去年完成的,从那以后,安装它的方法发生了变化.至少他们在这些视频中的表现方式......任何人都知道新的扩展或我可以遵循的一些新教程......
我已经做了一个多星期了。我试过在我的应用程序中设置 Google 地图活动,但没有成功。我还看到您可以从您的应用程序调用 Google 地图应用程序。通过使用 Onclicklistener。如何使用按钮从我的应用程序打开 Google 地图应用程序?这是我正在使用的代码...
import com.google.android.maps.GeoPoint;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class Store10 extends Activity {
Context context;
GeoPoint geo;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.store10);
Button num10 = (Button) findViewById(R.id.pNumber10);
Button nav10 = (Button) findViewById(R.id.Map10);
num10.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
// TODO Auto-generated method stub
Intent myIntent = new Intent(view.getContext() ,Num10.class);
startActivityForResult(myIntent, 0);
}
}); …
Run Code Online (Sandbox Code Playgroud) 我将我的应用程序发布到了Play商店.适合SGSII Epic 4.5",LG Optimus V 3.2",LG Optimus Black 4.0",Evo移动3.6"mytouch 4g 3.8",但它不适合droid bionic 4.3".有谁知道为什么它不适合屏幕?屏幕尺寸为4.3英寸,但应用程序仅占用4.3英寸屏幕上3.6英寸屏幕的空间.当三星向侧面倾斜时,它会尝试进入横向模式,并且我将它设置为android:screenOrientation清单中的"肖像"
这是我的主要xml
android:layout_width="320dp"
android:layout_height="485dp"
android:orientation="vertical"
android:padding="15dp"
android:background="@drawable/graybkg"
>
<Button
android:id="@+id/national"
android:layout_width="300dp"
android:layout_height="120dp"
android:layout_gravity="center"
android:background="@drawable/custtomnatbut"
/>
<Button
android:id="@+id/yorgeys"
android:layout_width="300dp"
android:layout_height="120dp"
android:layout_gravity="center"
android:background="@drawable/custtomyorgeys"
/>
Run Code Online (Sandbox Code Playgroud)
android:layout_width="300dp"
android:layout_height="60dp"
android:layout_gravity="center"
android:background="@drawable/custtomfoursq"
/>
<LinearLayout
android:layout_width="300dp"
android:layout_height="60dp"
android:layout_gravity="center"
>
<Button
android:id="@+id/facebook"
android:layout_width="150dp"
android:layout_height="60dp"
android:background="@drawable/custtomface"
/>
<Button
android:id="@+id/website"
android:layout_width="150dp"
android:layout_height="60dp"
android:background="@drawable/custtom_web"
/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)