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. Copy a database from a retail phone to a development phone?

I have a need to examine the contacts and call log databases. My
development phone has no contacts; it also has no SIM card, and hence
no calls. I need realistic data, so I can't just add some random
garbage. The obvious answer is to copy the database from my personal
(2.1u1 retail build) phone to my development (2.2 debug build) phone.

How?

I can `adb pull` the databases from my development phone but (while I
can `adb shell` to my retail phone, once I turn on USB debugging) I
can't  `adb pull` the databases from my retail phone.

Is there a better way than writing an "export" utility that will dump
the retail databases to text files, and an "import" utility that will
append that data to the debug databases?

-- 

2. App Challenges for Rock Bands!

Make an App for Rock legends Muse, Faithless, Metric or Eliza
Doolittle. We also have app contests for Coca-Cola, Diet Coke, Coke
Zero and charity mWomen. Win cash prizes, come to the Mobile World
Congress App Planet as our guest and potentially work with your
heroes! Contests close on 10th January 2011

For more details visit: http://www.mobileappchallenge.com

Follow us:

http://www.twitter.com/appchallenge
http://www.facebook.com/mobileappchallenge

-- 

3. Problem in getting the URI from a runtime bitmap image

4. KeyListener for WebView

5. how to open the popup box when i click on the button

6. Android 2.2 QVGA StatusIcon be Scaled in drawable-lpdi && layout-small

7. Android 2.2 VGA StatusIcon be Scaled in drawable-lpdi && layout-small