[android-developers] How to map customized column to search result?
Hi All, I have read google search document and read the sample for SearchableDicationary and NotePad for ContentProvider. however, I am confused by search query within ContentProvider. that is, how to map my customized column to Search display Result. for example: my database construct: _id, firstname, lastname; when do my query within Contentprovider: public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { try{ SQLiteDatabase database = openDatabase(context); return database.query(ContactConst.TABLE_NAME,new String[] {ContactConst.ID_KEY,ContactConst.FIRST_NAME,ContactConst.LAST_NAME},null,null,null,null,ContactConst.FIRST_NAME); }catch(Exception ex) { Log.e("DB",ex.toString()); } } I can see it is searched and return result, however, it never show information on screen. I can scroll up/down, but it is blank. how to map my firstname or lastname as SUGGEST_COLUMN_TEXT_1? Thanks. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] RelativeLayout does not work Correctly(Bug?)
Hi There, I have created RelativeLayout and added only one TextView to make display at the center-horizantal. However, it does not work. it always show up left-align. Here is my code: RelativeLayout rl = new RelativeLayout(this); rl.setLayoutParams(new RelativeLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); TextView view = new TextView(this); view.setHeight(40); view.setText("Test"); RelativeLayout.LayoutParams rlp = new RelativeLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT); rlp.addRule(RelativeLayout.CENTER_HORIZONTAL); rl.addView(view,rlp); setContentView(rl); Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Why not display Vertical Scroll bar and can not scroll down.
Hi Megha, Thanks for your replay, it was really helpful. I have done this according to your msg. it does work. However, this things is that if content of LinearLayout is not enought to fill the screen, while the LinearLayout's background is set to YELLOW or WHITE,or what ever not BLACK(since the default background color is BLACK) The background color of filled area will be displayed correctly, the rest area is still BLACK. So it is so odd. Here is my Code : public View getView(.){ ScrollView sv = new ScrollView(mCtx); sv.setLayoutParams(new LinearLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); sv.addView(mLL,new LinearLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); return sv; } mLL definition is : mLL = new LinearLayout(mCtx); mLL.setOrientation(LinearLayout.VERTICAL); mLL.setLayoutParams(new LinearLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); mLL.setVerticalScrollBarEnabled(true); mLL.setBackgroundColor(0xcc99); ... Thanks On Apr 9, 5:10 pm, "Megha Joshi" <[EMAIL PROTECTED]> wrote: > Hi, > > I think you have not placed your LinearLayout inside a ScrollView, this is > needed if you want the scrollbars. > > http://schemas.android.com/apk/res/android"; > android:layout_width="fill_parent" > android:layout_height="fill_parent"> > > android:orientation="vertical" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:id="@+id/linearLayout"> > > > > > Thanks, > Megha > > On Wed, Apr 9, 2008 at 1:25 PM, Android-Berry <[EMAIL PROTECTED]> > wrote: > > > > > > > Hi There, > > > I have created Linearlayout dynamatically. and added some Checkbox, > > and RadioButton to. > > which can not display within one screen. > > > however, it does not show Vertical Scroll bar, and down - arrow does > > not work neither. > > > here is the source code that I am using, > > > mLL = new LinearLayout(mCtx); > > mLL.setOrientation(LinearLayout.VERTICAL); > > mLL.setLayoutParams(new LinearLayout.LayoutParams( > > LayoutParams.FILL_PARENT, > > LayoutParams.WRAP_CONTENT)); > > mLL.setVerticalScrollBarEnabled(true); > > mLL.setBackgroundColor(0xcc99); > > > and it is displayed within TabPanel. > > > Thanks- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] what is wrong with this simple custom view?
Hi There, I have created a simple custom view to display a line and added it to the LinearLayout. the custom view is displayed on Screen, the other view following the cusomview never show up on Screen. Thanks here is the code: from the code, I have added a CheckBox to LinearLayout after adding CustomView package android.test.custom; import android.app.Activity; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.os.Bundle; import android.view.View; import android.widget.CheckBox; import android.widget.LinearLayout; import android.widget.LinearLayout.LayoutParams; public class Test extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); //setContentView(R.layout.main); LinearLayout ll = new LinearLayout(this); ll.addView(new CustomView(this),new LinearLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); ll.setOrientation(LinearLayout.VERTICAL); ll.addView(new CheckBox(this),new LinearLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); setContentView(ll); } class CustomView extends View { public CustomView(Context ctx) { super(ctx); } /* (non-Javadoc) * @see android.view.View#onDraw(android.graphics.Canvas) */ @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); canvas.save(); Paint p = new Paint(); p.setColor(Color.WHITE); canvas.drawLine(0, 0, 100, 0, p); canvas.restore(); } } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Why not display Vertical Scroll bar and can not scroll down.
Hi There, I have created Linearlayout dynamatically. and added some Checkbox, and RadioButton to. which can not display within one screen. however, it does not show Vertical Scroll bar, and down - arrow does not work neither. here is the source code that I am using, mLL = new LinearLayout(mCtx); mLL.setOrientation(LinearLayout.VERTICAL); mLL.setLayoutParams(new LinearLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); mLL.setVerticalScrollBarEnabled(true); mLL.setBackgroundColor(0xcc99); and it is displayed within TabPanel. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] deploy android application
Hi there, I have finished my project. I want to deploy it to a real LINUX smart device. how to deploy it? Thanks My IDE is Eclipse~ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to insert a menuitem?
Hi Guys, Thanks for your help, I can create menuitem dynmatically, However, I have found another issue, For example, when I added a menuitem at first place. and since content of screen has been changed, so this menuitem has been removed. but things changed again, I will display this menuitem again, but I want it show up at the same place as it first showed instead of being displayed at the last place, which current I implemented. How to set menuitem position, like insert function? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] dynmatically create menuitem
Hi There, As you know, we create a menuitem at onCreateOptionsMenu method, However, when the view content has been changed, for example, first the Screen is blank, no view is added,and we display only one menuitem called "Add a Button", After fullfill this function, I want to add a menuitem "Delete a Button" when A button-view added to screen and focus is on. so when the user click menu, it will show Add a Button,Delete aButton. How to implement this function, which method should we override it? Thanks~~ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: android:password first letter problem
I have the issue that you mentioned ~~ Did you get any solution? Thanks~ On Apr 7, 1:10 pm, David Given <[EMAIL PROTECTED]> wrote: > goro wrote: > > Hi all, > > I have the following problem: > > I have an EditText with android:password="true". When I type in, the > > first letter allways appears instead of a dot. I have in the xml > > file: > > IIRC, when in password mode, an EditText will always show you the last > character in clear (presumably for T9 text entry). Is this what you're > seeing? > > -- > David Given > [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] how to change Menu show up as VERTICAL?
Hi There, After creating the menuitems and add them to Menu, they are showing HORIZONTAL instead of VERITCAL, like the following style: I3 | ITEM4 | ITEM5 -- FIRST 1 | SECOND 2 how to make them display like vertical alignment ITEM5 ITEM4 I3 SECOND 2 FIRST 1 Thanks~ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Android EditText Bug?
Hi All, Is there anyone meets this issue? When I extend EditText view, and call super, it always throws me and exception like below: DEBUG/dalvikvm(599): Exception Ljava/lang/ClassNotFoundException; from PathClassLoader.java:205 not caught locally DEBUG/dalvikvm(599): NOTE: loadClass 'org.apache.harmony.luni.internal.locale.ISO4Currencies_en_US' 0x40018950 threw an exception DEBUG/dalvikvm(599): Exception Ljava/lang/ClassNotFoundException; from PathClassLoader.java:205 not caught locally DEBUG/dalvikvm(599): NOTE: loadClass 'org.apache.harmony.luni.internal.locale.ISO4Currencies_en' 0x40018950 threw an exception DEBUG/dalvikvm(599): Exception Ljava/lang/ClassNotFoundException; from PathClassLoader.java:205 not caught locally DEBUG/dalvikvm(599): NOTE: loadClass 'org.apache.harmony.luni.internal.locale.ISO4CurrenciesToDigits_en_US' 0x40018950 threw an exception DEBUG/dalvikvm(599): Exception Ljava/lang/ClassNotFoundException; from PathClassLoader.java:205 not caught locally DEBUG/dalvikvm(599): NOTE: loadClass 'org.apache.harmony.luni.internal.locale.ISO4CurrenciesToDigits_en' 0x40018950 threw an exception what I am doing is: 1:public class EditTextView extends EditText{ 2: private Object obj; 3: public ExitTextView(Context ctx, Object obj){ 4: super(ctx); 5: this.obj = obj; } } Issue happens at : line 4. Thanks~ } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to getTable list from SQLiteDatabase
I have got it, Use SQLiteData SQLITE_MASTER table, Thanks. On Apr 3, 9:44 am, Android-Berry <[EMAIL PROTECTED]> wrote: > Hi All, > > As title, if App has dynmatically created some table within database. > > How to get table list from database? > > Thanks~ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to getTable list from SQLiteDatabase
Hi All, As title, if App has dynmatically created some table within database. How to get table list from database? Thanks~ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] how to make a View always display on Screen?
Hi there, I want to create a view stick with screen, what I means is like status bar, but is always at the bottom of screen, for example, Create a view and it will show at the bottom of the screen, maybe the screen holds tabview or linearlayout view that holds lots of view, which is needed to scroll up/down/right/left to browser all the view, No matter how to do, the Stick-view always is displayed on the bottom of the screen. Thanks~~ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Display Context menu
Hi There, If there is particular view with some specifical menu, When pushing menu, if focus is on that view, it will display specifical menu, if not, it will not show up. How to implement this function? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Transfer a Serializable obj to other activity issue? how to do this?
I have create a class implements Serializable, public class FormDef implements Serializable{ some string variable. and some vector container holds some serializable obj. ... ... } call subActivity Intent i = new Intent(this,RecordFieldScreen.class); Bundle bundle = new Bundle(); bundle.putSerializable(ParameterDef.FORM_NAME, obj); i.putExtra(ParameterDef.FORM_NAME, bundle); i.putExtra(ParameterDef.VALUE_CARRY,false); startSubActivity(i,ParameterDef.DETAIL_SCREEN); after exectue startSubActivity statement, it throws me an error via LogCat, say: DEBUG/dalvikvm(519): Exception Ljava/lang/ClassNotFoundException; from PathClassLoader.java:205 not caught locally DEBUG/dalvikvm(519): NOTE: loadClass 'com.wallacewireless.android.forms.form.FormDef' 0x40018950 threw an exception DEBUG/dalvikvm(519): Exception Ljava/lang/RuntimeException; from Parcel.java:891 not caught locally So, How I can transfer an object to another activity? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Refresh view from BackGround thread
Hi All, My case is: when the application starts, it will show a initialize view, let me see welocome view, and also start a background thread to load some content, after all the content loaded, and build a view, then will set this new view. Simple source: calss Test extends Activity implements DoneListener { public void onCreat() { setContentView(view); new Load(this).start(); } public void done() { setContentView(otherview); } } class Load extends Thread { public void run() { sleep(5); listenr.done(); } } interface DoneListener { public void done(); } when done method call setContentView, it throws me an exception, how to implements this case? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] SQLite Database Issue.
Hi ALL, I open a data base and create table on my database, but when I want to insert a record, why do I need to define my table primary key values? here is the query to create table: CREATE TABLE form ( _id INTEGER PRIMARY KEY AUTOINCREMENT,name TEXT NOT NULL ,addr TEXT NOT NULL ,user TEXT NOT NULL ,pass TEXT NOT NULL ,definition TEXT NOT NULL ,icon INTEGER NOT NULL ,count INTEGER NOT NULL ); I have defined _id as primary key and auto increment, but when I insert a record: here is the query: [code] sqlite> insert into form values(11,22,33,44,55,66,77); insert into form values(11,22,33,44,55,66,77); SQL error: table form has 8 columns but 7 values were supplied sqlite> insert into form values(11,22,33,44,55,66,77,88); insert into form values(11,22,33,44,55,66,77,88); sqlite> select * from form; select * from form; _id|name|addr|user|pass|definition|icon|count 11|22|33|44|55|66|77|88 sqlite> [/code] Thanks so much~ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to delete the database from DDMS?
I want to delete a database which is created by my application. However when I use DDMS FileExplorer, select my database node and push "-" to delete, it does not work. How to remove some garbage database, which is created during test period. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Can I save a Serializable object to SQLite datastorage.
As title, I want to save an serializable object to datastore? is it possible? Is there any example for me? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Eclipse 19% BUG
I have this issue too, now I am using relaunch on debug perspective. it works a little better. On Mar 27, 6:02 am, David Given <[EMAIL PROTECTED]> wrote: > GUS wrote: > > [...] > > > Sometimes when I'm compiling an application to run it on the emulator, > > something crashes. > > The Launching progress stops in (19%) and the application is never > > loaded. > > So I have to close Eclipse, open the Windows Task Manager and shut > > down the Eclipse process. > > When I open it again, it is working fine without changing anything on > > the code. > > Yes, I get this too. It's *really annoying*... does anyone have any > workarounds? > > -- > David Given > [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---