I'm doing a simple Bluetooth App, to control the window of a car (only for research).
Layout should be two Buttons (Window up and Window down) and a TextView to printed responses on my actions and parameters.
Problem is, that both buttons won't appear in my app :(
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<Button
android:id="@+id/btn_window_up"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="@string/btn_window_up" />
<Button
android:id="@+id/btn_window_down"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/btn_window_up"
android:text="@string/btn_window_down" />
<TextView
android:id="@+id/TextView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/btn_window_down"
android:text=""Demo ADK V1.0"" />
</RelativeLayout>
Does anyone has a suggestion how I can solve this?
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
RxThread rxThread = new RxThread();
MessageStructure demoTxMsg = new MessageStructure();
ReturnCode returnCode = null;
ArrayList<String> deviceList = new ArrayList<String>();
Button btnWindowDown = (Button) findViewById(R.id.btn_window_down);
Button btnWindowUp = (Button) findViewById(R.id.btn_window_up);
tv = new TextView(this);
}
Here the Java-Code
and the manifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ixxat.adk.demo"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="13" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".Demo_ADKActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>