problem with editText and disabling autoText

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

problem with editText and disabling autoText

Postby dreamdelerium » Mon Jan 04, 2010 4:42 pm

Hello everyone. Im having a problem disabling autoText. To be honest, i dont even know why this is happening. i have an activity with two editText fields. both created the same way but only one, at runtime on an emulator, will start up the autoFill and virtual keyboard when i start typing in it. i want to disable this for two reasons. first, for consistency and second because it seems to cause my app to unexpectedly shut down. heres my code and xml layout i have. any help would be greatly appreciated. thanks!

jason

layout.xml:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  4.  
  5.    android:layout_width="fill_parent"
  6.  
  7.    android:layout_height="fill_parent">
  8.  
  9.  
  10.  
  11.     <TextView
  12.  
  13.        android:id="@+id/label"
  14.  
  15.        android:layout_width="fill_parent"
  16.  
  17.        android:layout_height="wrap_content"
  18.  
  19.        android:text="Card Name:"/>
  20.  
  21.  
  22.  
  23.     <EditText
  24.  
  25.        android:id="@+id/entry"
  26.  
  27.        android:layout_width="fill_parent"
  28.  
  29.         android:autoText="false"
  30.  
  31.         android:inputType="textEmailAddress"
  32.  
  33.        android:layout_height="wrap_content"
  34.  
  35.        android:background="@android:drawable/editbox_background"
  36.  
  37.        android:layout_below="@id/label"/>
  38.  
  39.  
  40.  
  41.     <TextView
  42.  
  43.        android:id="@+id/label2"
  44.  
  45.        android:layout_width="fill_parent"
  46.  
  47.        android:layout_height="wrap_content"
  48.  
  49.        android:text="Card Number:"
  50.  
  51.        android:layout_below="@id/entry"/>
  52.  
  53.  
  54.  
  55.     <EditText
  56.  
  57.        android:id="@+id/entry2"
  58.  
  59.        android:layout_width="fill_parent"
  60.  
  61.        android:layout_height="wrap_content"
  62.  
  63.         android:autoText="false"
  64.  
  65.         android:inputType="textEmailAddress"
  66.  
  67.        android:background="@android:drawable/editbox_background"
  68.  
  69.        android:layout_below="@id/label2"/>
  70.  
  71.  
  72.  
  73.     <Button
  74.  
  75.        android:id="@+id/ok"
  76.  
  77.        android:layout_width="wrap_content"
  78.  
  79.        android:layout_height="wrap_content"
  80.  
  81.        android:layout_below="@id/entry2"
  82.  
  83.        android:layout_alignParentRight="true"
  84.  
  85.        android:layout_marginLeft="10dip"
  86.  
  87.        android:text="Save Changes" />
  88.  
  89.  
  90.  
  91.     <Button
  92.  
  93.         android:id="@+id/edit"
  94.  
  95.        android:layout_width="wrap_content"
  96.  
  97.        android:layout_height="wrap_content"
  98.  
  99.        android:layout_toLeftOf="@id/ok"
  100.  
  101.        android:layout_alignTop="@id/ok"
  102.  
  103.        android:text="Exit" />
  104.  
  105.  
  106.  
  107.     <Button
  108.  
  109.         android:id="@+id/cancel"
  110.  
  111.        android:layout_width="wrap_content"
  112.  
  113.        android:layout_height="wrap_content"
  114.  
  115.        android:layout_toLeftOf="@id/edit"
  116.  
  117.        android:layout_alignTop="@id/edit"
  118.  
  119.        android:text="Return" />
  120.  
  121.  
  122.  
  123.  
  124.  
  125. </RelativeLayout>
Parsed in 0.007 seconds, using GeSHi 1.0.8.4
//ive tried this with and without android:autoText="false"
android:inputType="textEmailAddress"

activity:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. package com.vch;
  3.  
  4. import java.io.FileNotFoundException;
  5.  
  6. import java.util.ArrayList;
  7.  
  8.  
  9.  
  10. import android.app.Activity;
  11.  
  12. import android.content.Intent;
  13.  
  14. import android.database.sqlite.SQLiteDatabase;
  15.  
  16. import android.os.Bundle;
  17.  
  18. import android.view.View;
  19.  
  20. import android.widget.Button;
  21.  
  22. import android.widget.EditText;
  23.  
  24. import android.widget.Toast;
  25.  
  26.  
  27.  
  28. public class dialogAddNew extends Activity {
  29.  
  30.  
  31.  
  32.  
  33.  
  34.    
  35.  
  36.         public void onCreate(Bundle savedInstanceState) {
  37.  
  38.             super.onCreate(savedInstanceState);
  39.  
  40.             setContentView(R.layout.layout);
  41.  
  42.            
  43.  
  44.         final Button button = (Button) findViewById(R.id.ok);
  45.  
  46.         final EditText cardName = (EditText) findViewById(R.id.entry);
  47.  
  48.         final EditText cardNumber = (EditText) findViewById(R.id.entry2);
  49.  
  50.        
  51.  
  52.         button.setOnClickListener(new View.OnClickListener() {
  53.  
  54.             public void onClick(View v) {
  55.  
  56.                  //String CN =  cardName.getText().toString();
  57.  
  58.                 // String CNum =  cardNumber.getText().toString();              
  59.  
  60.                
  61.  
  62.             }
  63.  
  64.         });
  65.  
  66.  
  67.  
  68.         final Button button2 = (Button) findViewById(R.id.scan);
  69.  
  70.         button2.setOnClickListener(new View.OnClickListener() {
  71.  
  72.             public void onClick(View v) {
  73.  
  74.                  //Toast.makeText(dialogAddNew.this, "ok Pressed", Toast.LENGTH_SHORT).show();
  75.  
  76.             }
  77.  
  78.         });
  79.  
  80.        
  81.  
  82.         final Button button3 = (Button) findViewById(R.id.cancel);
  83.  
  84.         button3.setOnClickListener(new View.OnClickListener() {
  85.  
  86.             public void onClick(View v) {
  87.  
  88.             //   Toast.makeText(dialogAddNew.this, "Cancel Pressed", Toast.LENGTH_SHORT).show();               
  89.  
  90.                   Intent myIntent = new Intent(dialogAddNew.this, VCH.class);
  91.  
  92.                   dialogAddNew.this.startActivity(myIntent);
  93.  
  94.        
  95.  
  96.             }
  97.  
  98.         });
  99.  
  100.         }
  101.  
  102.  
  103.  
  104.  
  105.  
  106. }
  107.  
  108.  
Parsed in 0.041 seconds, using GeSHi 1.0.8.4


and heres the manifest:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <?xml version="1.0" encoding="utf-8"?>
  3.  
  4. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  5.  
  6.      package="com.vch"
  7.  
  8.      android:versionCode="1"
  9.  
  10.      android:versionName="1.0">
  11.  
  12.     <application android:icon="@drawable/icon" android:label="@string/app_name">
  13.  
  14.         <activity android:name=".VCH"
  15.  
  16.                  android:label="@string/app_name">
  17.  
  18.             <intent-filter>
  19.  
  20.                 <action android:name="android.intent.action.MAIN" />
  21.  
  22.                 <category android:name="android.intent.category.LAUNCHER" />
  23.  
  24.             </intent-filter>
  25.  
  26.         </activity>
  27.  
  28.                 <activity android:name=".dialogAddNew"
  29.  
  30.                         android:label="@string/app_name">
  31.  
  32.                 </activity>
  33.  
  34.                                 <activity android:name=".viewcard"
  35.  
  36.                         android:label="@string/app_name">
  37.  
  38.                 </activity>
  39.  
  40.                 <activity android:name=".editcard"
  41.  
  42.                         android:label="@string/app_name">
  43.  
  44.                 </activity>
  45.  
  46.     </application>
  47.  
  48.     <uses-sdk android:minSdkVersion="6" />
  49.  
  50.  
  51.  
  52. </manifest>
  53.  
  54.  
Parsed in 0.004 seconds, using GeSHi 1.0.8.4
dreamdelerium
Developer
Developer
 
Posts: 30
Joined: Fri Jan 01, 2010 11:19 pm

Top

Postby dreamdelerium » Mon Jan 04, 2010 11:41 pm

no one has any ideas?
dreamdelerium
Developer
Developer
 
Posts: 30
Joined: Fri Jan 01, 2010 11:19 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 5 guests