problem in Android Application

by rukesh » Fri, 19 Sep 2008 02:09:16 GMT


Sponsored Links
  m Rupesh Kumar.
I m trying to build a simple android application by sing eclips. The
java code for that project is as below

x.java

package x.y.z;

import x.y.z.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;


public class z extends Activity {
/** Called when the activity is first created. */

private EditText inputbox;
private TextView ans;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTheme(android.R.style.Theme_Dialog);
inputbox=(EditText)findViewById(R.id.editor);
inputbox.setText("");
ans=(TextView)findViewById(R.id.msg);
Button b = (Button)findViewById(R.id.b);

b.setOnClickListener(new Button.OnClickListener()
{
public void onClick(View v)
{
ans.setText("WelCome"+inputbox.getText());
inputbox.setText("");
}
});
setContentView(R.layout.main);
}

}



and
main. xml file is as below
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="8px"
android:paddingRight="8px"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView android:id="@+id/msg"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Enter Your Name:-"
/>
<EditText android:id="@+id/editor"
android:layout_width="fill_parent"
android:layout_height="50px"
android:capitalize="sentences"
android:layout_weight="1" >
<requestFocus />
</EditText>

<Button id="@+id/b"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="10"
android:layout_alignParentRight="false"
android:layout_marginLeft="100px"
android:text="Display" />
<ToggleButton
android:text="HelloRupesh"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/b"
android:layout_toLeftOf="@id/b"
android:layout_alignTop="@id/b"
android:src="@android:drawable/sym_action_call" />

<ImageView
android:src="@drawable/x"
android:adjustViewBounds="true"
android:maxWidth="30mm"
android:maxHeight="600mm"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<FrameLayout
android:layout_width="fill_parent"



problem in Android Application

by Megha Joshi » Fri, 19 Sep 2008 02:58:42 GMT


 id you check your logcat output? It will give you more details on the
error.
If you aren't able to resolve it from there, please post again with the
logcat output.

2008/9/18 rukesh <[EMAIL PROTECTED]>


--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. How to make SMS composing UI same Like Default.

Could the source be a starting point for you?
http://android.git.kernel.org/?p=platform/packages/apps/Mms.git;a=tree;f=res/layout;h=460b3fc45db10208f4383dc46eb9946b32105e29;hb=master





--~--~---------~--~----~------------~-------~--~----~

2. Efficiency question resources

Can anyone tell me which is more efficient:

1) Getting a resource id with getIdentifier(name, defType, package) or

2) doing a database lookup on a unique field

Thanks!

--~--~---------~--~----~------------~-------~--~----~

3. How to set some lists in one layout?

4. Diplay Logcats logs on console

5. How to use Android.mk to build a project with JNI library calls?

6. SoftKeyboard Example Problem

7. How to run test_pvauthorengine?