Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Want to check entry in Edit Text dynamically..help

Want to check entry in Edit Text dynamically..help

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Want to check entry in Edit Text dynamically..help

Postby debdeep » Tue Jan 20, 2009 7:20 pm

I want to write a code which dynamically checks the field of a EditText Box as i write in it...and displays a popup according to it. but im not being able to do it. Im providing a code snippet :-

private OnKeyListener mKeyListener = new OnKeyListener()
{
//@Override
public boolean onKey(View v, int keyCode, KeyEvent event)
{

switch (v.getId())
{
case R.id.txtAmount:
if(txtAmount.getText().length() > 0)
txtPeople.setEnabled(true);
else
txtPeople.setEnabled(false);
case R.id.txtPeople:
btnCalculate.setEnabled(txtAmount.getText().length() > 0
&& txtPeople.getText().length() > 0);
break;
case R.id.txtTipOther:
btnCalculate.setEnabled(txtAmount.getText().length() > 0
&& txtPeople.getText().length() > 0
&& txtTipOther.getText().length() > 0);
break;
}
return false;
}

};

i want to check the Edit Text box txtTipOther .When im inserting this line- Double.parseDouble(txtTipOther.getText().toString()) in case R.id.txtTipOther to check and display a popup when the entry is above 50, the emulator is forceclosing.
Please help me on this...thanks in advance
debdeep
Freshman
Freshman
 
Posts: 5
Joined: Tue Jan 20, 2009 3:56 pm

Top

Postby MrSnowflake » Tue Jan 20, 2009 8:57 pm

Check the exception in the log, that's what it's there for!
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby debdeep » Wed Jan 21, 2009 9:33 am

MrSnowflake wrote:Check the exception in the log, that's what it's there for!



where n how do i Check the exception in the log?
debdeep
Freshman
Freshman
 
Posts: 5
Joined: Tue Jan 20, 2009 3:56 pm

Postby debdeep » Wed Jan 21, 2009 1:13 pm

MrSnowflake wrote:Check the exception in the log, that's what it's there for!


have checked the exception, its java.lang.NumberFormatException...but cant fix it...any help?
debdeep
Freshman
Freshman
 
Posts: 5
Joined: Tue Jan 20, 2009 3:56 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 3 guests