simple button in a simple android application -
i trying work out google android tutoria , it's not simple task. after giving on emulator decided test on smartphone (galaxy 2, android 4.04) tested on newer smartphone (with android 4.2), don't think that's issue.
the code simple: strings.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name">myfirst</string> <string name="button_send">send</string> <string name="action_settings">settings</string> <string name="edit_message">enter message</string> <string name="title_activity_main">mainactivity</string> </resources>
mainactitivity.xml
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal"> <edittext android:id="@+id/edit_message" android:layout_width="0dp" android:layout_height="wrap_content" android:hint="@string/edit_message" android:layout_weight="1" /> <button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/button_send" />
if take out "button" section app works. if leave it, white screen followed "myfirst stopped"..
thanks help - sure it's greenish stuff need on :-) alon
1.- check button code.
2.- button opens new layout? if yes .. added new class manifiest?
post code , error log.
button
No comments:
Post a Comment