标签:des android blog http io ar java sp 文件
============问题描述============
protected void onCreate(Bundle savedInstanceState) { Log.v("GameWindow", "onCreate"); super.onCreate(savedInstanceState); setContentView(R.layout.gameview); // LayoutInflater inflater = (LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE); // View layout = inflater.inflate(R.layout.gameview,null); // gameView = (GameView) view.findViewById(R.id.game_sudo_view); gameView = (GameView) findViewById(R.id.game_sudo_view); if(gameView == null){ Log.v("gameView", "onCreate->null"); } levelTextView = (TextView)findViewById(R.id.leveltextview); levelTextView.setText("Topic."+1)); if(levelTextView == null){ Log.v("TextView", "onCreate->null"); } }
<?xml version="1.0" encoding="utf-8" ?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/back"> <ImageView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:contentDescription="@string/app_name" android:src="@drawable/grass" /> <com.ljx.gameview.GameView android:id="@+id/game_sudo_view" android:layout_centerInParent="true" android:layout_width="fill_parent" android:layout_height="wrap_content"/> <TextView android:layout_centerHorizontal="true" android:layout_above="@id/game_sudo_view" android:id="@+id/leveltextview" android:layout_marginTop="10dp" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </RelativeLayout>
============解决方案1============
标签:des android blog http io ar java sp 文件
原文地址:http://www.cnblogs.com/lianxu61/p/4089292.html