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. ath5k disagrees with the version of struct_symbol

Hi Everyone:

I am trying to compile Wifi support, but getting stuck at a more basic
place.  I dont think I am even loading the kernel that I am
compiling.  Here is what I do - I did a menuconfig on the kernel, and
compiled bzImage.  I also did something like 'make SUBDIRS=drivers/net/
wireless/ath5k modules' to get a ath5k.ko file for the module.

Then I copied the bzImage into the vendor/asus/eee_701 directory as
suggested.  Also the ath5k.ko module into vendor/asus/eee_701/modules
directory.  The module ends up in the image allright.  I have added
the relavant lines in the init.rc to load the ath5k module also.

However, in the dmesg, I see something like "ath5k disagrees with the
version of struct_symbol".  Looks like the stock kernel that came from
the repo (2.6.25) is being loaded, rather than the one I compiled
2.6.27.  That kind of makes sense, since the driver didnt work when I
tried to make it part of the driver rather than a module either.

I must be missing a step after copying the bzImage into place and
before I compile the installer_img OR the make-live script is making a
difference.  One of these.  Can you help?

Regards,
Gani
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Compile Again after new bzImage

Hi:

After following the threads on this forum, I have setup a build
environment on Ubuntu 8.10.

I have successfully done the repo sync, and compiled an image, which I
use with the make-live script to test on my Aspire-One.  So far so
good.

I also managed to enable VESA_FB, and remove PMEM etc., and actually
the Android GUI boots up fine on the Aspire-One.  Even better.

Now, I am trying to enable the WiFi card on the Aspire One, which I
know is a ATH5K.  So, I did a 'make menuconfig' again, enabled the
Atheros card as part of the kernel rather than a module, and compiled
bzImage, which amazingly (for this noob) compiles correctly.   Then I
moved the bzImage to the vendor/asus/eee_701 directory as suggested in
the forum.  I do the compile for installer_img again - but the process
comes back within a few seconds saying "Nothing to be done for
installer_img"

Where am I going wrong?  The first time this happened, I did a make
clean (with target set as x86) and it removed everything under out/.
After that when I did the compile again, it took a long time and
completed.

I am trying to find out if there is a way to do this in a shorter time
to incorporate just the new bzImage, rather than compile everything
again?

I am sure I have left out a detail or two up there in asking a
question - give the noob a break...

Regards,
Gani


--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. IMX31 3stack board. Error msg: Warning: unable to open an initial console

4. Does the AndroidManifest.xml file is mandatory to make changes to apk with aapt tool ???

5. Has 3GPP PSS Release 6 been fully supported in cupcake

6. encoder support in OpenCORE/cupcake

7. C to CPP conversion (or vice-versa) based on the package type having C or CPP.