Re: [android-developers] Re: How to: Free to Paid App and retain preference and db files?

2012-07-02 Thread Mystique
is not a purchase version? This way, developer don't have to include LVL code in every app publish. Of course in-app billing is not applicable. On Sunday, 1 July 2012 15:05:28 UTC+8, Dianne Hackborn wrote: > > On Sat, Jun 30, 2012 at 9:17 AM, Mystique wrote: > >> I was a

[android-developers] Cannot populate List call from Main Class to Sub Class

2012-07-01 Thread Mystique
Hi, I try to explain my problem hope someone can help me point out the causes. I have a TabActivity that has 2 Tabs "MainApp.java" and "MethodB.java". MethodB has code to populate a List, MainApp also populate the same content but filter out some column so from MainApp I call the method Method

[android-developers] Calling sub-class getCursor() from main class problem

2012-07-01 Thread Mystique
Hi I have this in my method calling getCursor() and is working ok within the class. Now I try to call the method from the main class to perform some routine and receive error: "Cannot make a static reference to the non-static method getListAdapter() from the type ListActivity" So I changed fr

[android-developers] Calling sub-class getCursor() from main class problem

2012-07-01 Thread Mystique
Hi I have this in my method calling getCursor() and is working ok within the class. Now I try to call the method from the main class to perform some routine and receive error: "Cannot make a static reference to the non-static method getListAdapter() from the type ListActivity" So I changed fr

[android-developers] Calling sub-class getCursor() from main class problem

2012-07-01 Thread Mystique
Hi I have this in my method calling getCursor() and is working ok within the class. Now I try to call the method from the main class to perform some routine and receive error: "Cannot make a static reference to the non-static method getListAdapter() from the type ListActivity" So I changed fr

[android-developers] Re: Is there sqlite statement to delete first 5 rows?

2012-07-01 Thread Mystique
ll. > > If I assume that you have an ID column which you can order on the the > following will work (when you remove any typos I make): > > DELETE FROM my-table WHERE my-table.id IN (SELECT id FROM my-table ORDER > BY id LIMIT 5) > > > On Sunday, July 1, 2012 3:44:23 PM UTC+1

[android-developers] Is there sqlite statement to delete first 5 rows?

2012-07-01 Thread Mystique
Hi, let's say I want to delete top 5 rolls of data from the table. I can do a while loop with an counter call "i" and use "cursor.moveToPosition(i)" to move to the row and delete it. Is there a better way to do that? Thanks. -- You received this message because you are subscribed to the Google

Re: [android-developers] Re: How to: Free to Paid App and retain preference and db files?

2012-07-01 Thread Mystique
ng the Internet permission - you don't have to use ads in the free > version, rather offering the users some other incentive(s) to upgrade. > > 2012/7/1 Mystique > >> Hi, good to learn from all of you here. >> >> One of the usual request for the paid version is

Re: [android-developers] Re: How to: Free to Paid App and retain preference and db files?

2012-07-01 Thread Mystique
Jun 30, 2012 at 9:17 AM, Mystique wrote: > >> I was also thinking to write a simple app that generate hash value and >> write it in a file, user will purchase this app and my main app will look >> for this file and compare the hash value. Will this work? Does Google allow

Re: [android-developers] Re: How to: Free to Paid App and retain preference and db files?

2012-06-30 Thread Mystique
Right, I have import/export features but only available in the plan paid version :) that's why. On Sunday, 1 July 2012 00:11:04 UTC+8, James Black wrote: > > You can also allow them to export and import the data, to move from the > free to paid version. > On Jun 30, 2012 12

[android-developers] Re: How to: Free to Paid App and retain preference and db files?

2012-06-30 Thread Mystique
I was also thinking to write a simple app that generate hash value and write it in a file, user will purchase this app and my main app will look for this file and compare the hash value. Will this work? Does Google allow this? On Sunday, 1 July 2012 00:02:54 UTC+8, Mystique wrote: > > H

[android-developers] Re: How to: Free to Paid App and retain preference and db files?

2012-06-30 Thread Mystique
; Have you considered using in-app-purchasing to turn off the ads and unlock > the extra features? > > > > On Saturday, June 30, 2012 10:01:11 AM UTC+1, Mystique wrote: >> >> Hi, >> >> I have a Ads supported app and I am planning to release a paid version

Re: [android-developers] How to: Free to Paid App and retain preference and db files?

2012-06-30 Thread Mystique
s and database. > > If the.apk is different then you will need to consider how to export the > sharedprefs/db from the current version (an update), to the sdcard, and > have an import function in the newer version. > > Hope this helps, > Fred > > On 30 June 2012 10:01, Mys

[android-developers] How to: Free to Paid App and retain preference and db files?

2012-06-30 Thread Mystique
Hi, I have a Ads supported app and I am planning to release a paid version without Ads and extra features. My questions are how do I release the app so my user can purchase and use with losing the preferences and db? Can I package it with the same name and upload into Google Play as new app or

[android-developers] Re: Disable search button press during ProgressDialog

2012-06-23 Thread Mystique
This is the answer, stupid me I put it in the wrong dialog.. On Sunday, 24 June 2012 01:17:25 UTC+8, Mystique wrote: > > Like this? > > dialog.setOnKeyListener(new DialogInterface.OnKeyListener() { > public boolean onKey(DialogInterface dialog, int keyCode,

[android-developers] Re: Disable search button press during ProgressDialog

2012-06-23 Thread Mystique
Like this? dialog.setOnKeyListener(new DialogInterface.OnKeyListener() { public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) { return keyCode == KeyEvent.KEYCODE_SEARCH; } }); I can seems to get it work either, pressing "search" button still dismiss

[android-developers] Re: Disable search button press during ProgressDialog

2012-06-23 Thread Mystique
I did, not working... On Sunday, 24 June 2012 00:37:06 UTC+8, Nobu Games wrote: > > Try overriding > onSearchRequestedin > your Activity and return false when that dialog is open. > -- You received this m

[android-developers] Re: Disable search button press during ProgressDialog

2012-06-23 Thread Mystique
This do not work too. dialog = new ProgressDialog(Main.this){ @Override public boolean onSearchRequested() { return false; } }; On Sunday, 24 June 2012 00:16:40 UTC+8, Mystique wrote: > > I have a simple ProgressDialog but I realized if I press the

[android-developers] Disable search button press during ProgressDialog

2012-06-23 Thread Mystique
I have a simple ProgressDialog but I realized if I press the search button the dialog will be dismiss. What can I do to disable search button press during this process? dialog = new ProgressDialog(Main.this); dialog.setTitle("Working in progress"); dialog.setMessage("Please wait..."); dialog.se

[android-developers] Am I doing UncaughtExceptionHandler correctly?

2011-02-07 Thread Mystique
Hi, I want to intercept all exceptions with a global exception with a AlerDialog but my UncaughtExceptionHandler doesn't seems to show the dialog. Did I implement it correctly? Many Thanks. I put this in onCreate() -> Thread.setDefaultUncaughtExceptionHandler(onDirectoryException); --- The I imp

[android-developers] Problem with addTextChangedListener(new TextWatcher()

2011-02-04 Thread Mystique
Hi, What is wrong with my addTextChangedListener() implementation? Something wrong with adapter.getFilter().filter(s)? It crash with this statement, if I remark it then it will not crash but the filter won't work of cause. Many thanks. --- searchbar = (EditText)findViewByI

[android-developers] Re: Listview crash during orientation change

2011-02-04 Thread Mystique
Alright, I solved the problem by moving all view element out of OnCreate(); On Feb 5, 9:04 am, Mystique wrote: > Hi, > > I have a listview and is working good but i realize if I do a screen > orientation change it will crash. Why is that so? > > Many thanks. > > --- >

[android-developers] Listview crash during orientation change

2011-02-04 Thread Mystique
Hi, I have a listview and is working good but i realize if I do a screen orientation change it will crash. Why is that so? Many thanks. --- 02-05 01:04:41.208: ERROR/AndroidRuntime(14593): FATAL EXCEPTION: main 02-05 01:04:41.208: ERROR/AndroidRuntime(14593): java.lang.NullPointerException 02-05

[android-developers] Re: How to retrieve value from onItemClick(AdapterView)?

2011-02-04 Thread Mystique
Many Thanks to all of you. Both methods work :) -- 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+unsubs

[android-developers] Re: How to retrieve value from onItemClick(AdapterView)?

2011-02-04 Thread Mystique
Typo during cut/past for: String C = pullParser.getAttributeValue(null, "c"); On Feb 5, 12:08 am, Mystique wrote: > Hi Master Murphy, > > The list is a ArraryList> > > ArrayList> list = new > ArrayList>(); > >                         while (

[android-developers] Re: How to retrieve value from onItemClick(AdapterView)?

2011-02-04 Thread Mystique
Hi Master Murphy, The list is a ArraryList> ArrayList> list = new ArrayList>(); while (eventType != XmlResourceParser.END_DOCUMENT) { if (eventType == XmlResourceParser.START_TAG) { // Get the name o

[android-developers] How to retrieve value from onItemClick(AdapterView)?

2011-02-04 Thread Mystique
I have the following, how do I get current position, value C during onItemClick? Many Thanks. adapterS = new SimpleAdapter(this, list, R.layout.sort_by_name, new String[] {"A","B", "C"}, new int[] {R.id.A, R.id.B, R.id.C} ); lv.setAdapter(adapterS); --- lv.setOnItemClickListener(new OnItemClickL

[android-developers] Re: How to sort HashMap?

2011-02-02 Thread Mystique
Yes sir. On Feb 2, 11:41 pm, TreKing wrote: > On Wed, Feb 2, 2011 at 9:12 AM, Mystique wrote: > > I have this error -> > > The constructor SimpleAdapter(Directory, ArrayList, > > int, String[], int[]) is undefined > > > Not very sure about it. > > The b

[android-developers] Re: How to sort HashMap?

2011-02-02 Thread Mystique
Hi DanH, Although I'm a bit lost as Java is a very new language to me, I will try to figure what you mean. SimpleAdapter adapterShop = new SimpleAdapter(this, ppp, R.layout.sort_by_name, new String[] {"name","age"}, new int[] {R.id.name,R.id.age ); I have this error -> The constructor SimpleAdap

[android-developers] Re: How to sort HashMap?

2011-02-01 Thread Mystique
sorry shd be: ArrayList qqq = new ArrayList(); What is wrong with my code? On Feb 2, 1:43 pm, Mystique wrote: > Ok, I did this but runtime error, did I do wrong? > > --- > > public class Sortable { >     private String name; >     private String age; &g

[android-developers] Re: How to sort HashMap?

2011-02-01 Thread Mystique
Ok, I did this but runtime error, did I do wrong? --- public class Sortable { private String name; private String age; public Sortable(){ } public Sortable(String name, String age){ this.name = name; this.age = age; } public String getName() {

[android-developers] Re: How to sort HashMap?

2011-02-01 Thread Mystique
Hi Treking, I have many sets of hashmap which each set is a group of related data, I then store it into ArrayList for display into a ListView. Something like that. On Feb 2, 11:11 am, TreKing wrote: > On Tue, Feb 1, 2011 at 8:15 PM, Mystique wrote: > > So let say I have test data,

[android-developers] Re: How to sort HashMap?

2011-02-01 Thread Mystique
ert the age and HashMap into, eg, a TreeMap, with > age being the key. > > On Feb 1, 8:15 pm, Mystique wrote: > > > > > > > > > Ok, I just read but unclear (java newbie) about this one: > > > ArrayList> list = new > > ArrayList>(); > > >

[android-developers] Re: How to sort HashMap?

2011-02-01 Thread Mystique
Ok, I just read but unclear (java newbie) about this one: ArrayList> list = new ArrayList>(); // I have a loop collecting these value from a XML parser HashMap map = new HashMap(); map.put("name",Tname); map.put("age",Tage); list.add(map); So let say I have test data, I want to sort the age in t

[android-developers] How to sort HashMap?

2011-02-01 Thread Mystique
Hi, I know I can use Collections.sort() to sort an ArrayList. But if I have HashMap, how do I do it? Possible to throw it into a temp ArrayList to sort it? ArrayList> mylist = new ArrayList>(); How do I sort this mylist? -- You received this message because you are subscribed to the Google G

[android-developers] Re: What's wrong with this code - SimpleAdapter

2011-02-01 Thread Mystique
right side of the screen. > > -- Kostya > > 01.02.2011 20:54, Mystique пишет: > > > > > > > > > > > Hi, I can't seems to display multiple roll in listview. What is wrong > > with my code? > > It just display line 1 - fruit1 and fruit2-4 do

[android-developers] What's wrong with this code - SimpleAdapter

2011-02-01 Thread Mystique
Hi, I can't seems to display multiple roll in listview. What is wrong with my code? It just display line 1 - fruit1 and fruit2-4 doesn't appear. --- ArrayList> list = new ArrayList>(); HashMap map = new HashMap(); map.put("fruit1","Apple"); map.put("fruit2", "Orange"); map.put("fruit3", "Pear");

[android-developers] Re: Downloading file and asynctask opinion needed

2011-01-06 Thread Mystique
Thank you all. I will keep it that way :) -- 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...@

[android-developers] Downloading file and asynctask opinion needed

2011-01-06 Thread Mystique
Hi, in my app I have an asynctask to download a file but the file size is only 50kb so it is almost instantaneous. Is worth worth to put it on async? Or I'm asking for trouble and should keep it simple? -- You received this message because you are subscribed to the Google Groups "Android Develope

[android-developers] Download file from a password protected http directory

2011-01-06 Thread Mystique
Hi, I'm currently using stream io to download a textbase data file from a site eg "example.com/meta/" I want to implement a authentication and tried using a browser to test. It is all good and i need to enter a id/ password before I can access to the protected location. What do I need to add in m

[android-developers] Re: How to do this layout correctly?

2011-01-04 Thread Mystique
t;...", where the ... is the ID of the widget. > > > > > > > > > > On Tue, Jan 4, 2011 at 8:22 PM, Mystique wrote: > > Hi, > > > I want to display a textview at the bottom last line of the screen but > > I have been trying withou

[android-developers] How to do this layout correctly?

2011-01-04 Thread Mystique
Hi, I want to display a textview at the bottom last line of the screen but I have been trying without success. What is the correct way to display it? Many thanks, CJ -- code -- http://schemas.android.com/apk/res/ android" android:orientation="vertical" android:layout_width="fill_parent"

[android-developers] Help me on AsyncTask

2011-01-04 Thread Mystique
Hi, I am doing some AsyncTask thing and seems to work ok and after that I open another intent to display a listview. The thing is, if the user press the back key, it return to the caller intent showing the progress dialog and seems to be hanging there until it crash. What did I do wrong? I already

[android-developers] Re: How to implement this with location.distanceTo()?

2011-01-01 Thread Mystique
eKing > Sent: Saturday, January 01, 2011 11:12 PM > To: android-developers@googlegroups.com > Subject: Re: [android-developers] How to implement this with > location.distanceTo()? > > On Sat, Jan 1, 2011 at 9:34 PM, Mystique wrote: > > I have runtime error - "NumericFormatErro

[android-developers] How to implement this with location.distanceTo()?

2011-01-01 Thread Mystique
Hi, I trying to do this but doesn't seems to get it right. I have runtime error - "NumericFormatError", is it because "1.35678" is not Long but Float. Then .setLatitute(Long) is long... how to implement this correctly? // extract value from XML (so it's string value) String Lat = pullParser.getAt

[android-developers] Re: String error...pls help to spot

2011-01-01 Thread Mystique
> them. > > or > > > float     distanceTo(Location dest) > > Returns the approximate distance in meters between this location and > > the given location. > > -- Kostya > > 01.01.2011 16:50, Mystique пишет: > > > > > > > > > > > Hi Kos

[android-developers] Re: String error...pls help to spot

2011-01-01 Thread Mystique
se Real.parseFloat / Double.parseDouble / NumberFormat to parse a > floating-point value; > > - use a strongly-typed array (ArrayList, ArrayList etc.) > instead of an array of strings to avoid conversions altogether. > > -- Kosyta > > 01.01.2011 16:21, Mystique пишет: > > >

[android-developers] Re: String error...pls help to spot

2011-01-01 Thread Mystique
d array (ArrayList, ArrayList etc.) > instead of an array of strings to avoid conversions altogether. > > -- Kosyta > > 01.01.2011 16:21, Mystique пишет: > > > > > > > > > > > Yes, I want to transfer the value of StringArray tmp2 in position 1

[android-developers] Re: String error...pls help to spot

2011-01-01 Thread Mystique
I now do int seed = Integer.parseInt(String.valueOf(tmp3)); and the runtime error seems to go away but I now got error doing the same... long seed2 = Long.parseLong(String.valueOf(tmp4)); What is missing? On Jan 1, 9:21 pm, Mystique wrote: > Yes, I want to transfer the value of StringAr

[android-developers] Re: String error...pls help to spot

2011-01-01 Thread Mystique
uke :) > > Check the value of tmp3 just before you call Integer.parseInt. > > I am assuming you actually added a value to tmp2, so when you call > get(1) there is something there. > > -- Kostya > > 01.01.2011 15:38, Mystique пишет: > > > > > > >

[android-developers] String error...pls help to spot

2011-01-01 Thread Mystique
Hi, please help me out. == This is ok == String tmp1 = "123" int seed = Integer.parseInt(tmp1); == This is not ok == ArrayList tmp2 = new ArrayList(); String tmp3 = tmp2.get(1); //Added some value to the ArrayList, Toast value of tmp3 and sees the correct value int seed = Integer.parseInt(tmp3)

[android-developers] Re: How to do this kind of screen alignment?

2010-12-31 Thread Mystique
and draw during run time. @@ On Jan 1, 12:13 am, TreKing wrote: > On Fri, Dec 31, 2010 at 2:52 AM, Mystique wrote: > > Any code example to do this layout for both portrait and > > landscape orientation? > > The likelihood of finding code examples that perfectly solve th

[android-developers] How to do this kind of screen alignment?

2010-12-31 Thread Mystique
Hi, I know fixing the point in the app to draw image/text are bad practices and I'm trying to do this correctly but been far from successful. Any code example to do this layout for both portrait and landscape orientation? |

[android-developers] Re: Listview using ArrayAdapter trouble

2010-12-30 Thread Mystique
Wow, this is new knowledge to me. Thanks! On Dec 31, 5:51 am, jotobjects wrote: > On Dec 29, 11:00 pm, Mystique wrote: > > > Good day, > > I do not understand the outer LinearLayout you was pointing out. > > Don't we need to declare a Layout so we can put c

[android-developers] Re: Listview using ArrayAdapter trouble

2010-12-29 Thread Mystique
like the outer LinearLayout is unnecessary in list.xml and > listadapter.xml. > > On Dec 29, 5:41 pm, Mystique wrote: > > > > > > > > > Hi, > > I have an app that I mine data with an ArrayList and load to an > > ArrayAdapter to display as listview. Ho

[android-developers] Listview using ArrayAdapter trouble

2010-12-29 Thread Mystique
Hi, I have an app that I mine data with an ArrayList and load to an ArrayAdapter to display as listview. How can I do more than 1 textview item in 1 roll? My code is: ---list.xml--- http://schemas.android.com/apk/res/ android" android:layout_width="fill_parent" android:layout_heig

[android-developers] Re: Listview selector no more color

2010-12-28 Thread Mystique
android:background="@drawable/selector"> > >                 android:textSize="16sp" android:layout_width="220px" >                 android:layout_height="60px" android:layout_marginLeft="8px" >                 android:ty

[android-developers] Listview selector no more color

2010-12-27 Thread Mystique
I just want the selector to be as default, when I select an item I see color change. But when I change my xml the selector is no longer working. Why is this so? --- http://schemas.android.com/apk/res/ android" android:layout_width="fill_parent" android:layout_height="fill_parent"

[android-developers] Re: Is this normal textview or webview?

2010-12-27 Thread Mystique
Thanks, my 2 great teachers. I will check them out. On Dec 27, 11:05 pm, Mark Murphy wrote: > On Mon, Dec 27, 2010 at 9:50 AM, Mystique wrote: > > I know it is a listview but is it a textview in the listview or > > webview in a listview? > > Most likely, each row is

[android-developers] Re: Is this normal textview or webview?

2010-12-27 Thread Mystique
nt in normal listview :) Regards, CJ On Dec 27, 1:56 pm, TreKing wrote: > On Sun, Dec 26, 2010 at 8:41 PM, Mystique wrote: > > Hi, how to achieve this listview? > > Use the same layout and style as the picture. > > >  Is it textview or web

[android-developers] Is this normal textview or webview?

2010-12-26 Thread Mystique
Hi, how to achieve this listview? Is it textview or webview? http://172.31.254.241/www.android.com/market/data/screenshots/com.zenmobi.android.app.nfl.jetsnews0.png Regards, CJ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to th

[android-developers] How to mkdirs() with "/sdcard/.testdir"

2010-12-25 Thread Mystique
Hi, I can mkdirs() with name like "/sdcard/testdir" but why not with a "." such as "/sdcard/.testdir"? Do I need to do something to "" the string name? Regards, CJ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send

[android-developers] Parse file located in sdcard

2010-12-25 Thread Mystique
Hi, Currently I am testing parsing file from /res: XmlResourceParser test = getResources().getXml(R.xml.test); If I want to parse from let say /sdcard/test/test.xml What statement do I use? Many Thanks, CJ -- You received this message because you are subscribed to the Google Groups "Android D

[android-developers] xml data best practise

2010-12-25 Thread Mystique
Hi, I'm working on a app that parse xml data from web. Is it better to download the entire xml file to a temp director and parse it or it is better to parse as stream to the memory? What is the common practice? Regards, CJ -- You received this message because you are subscribed to the Google Gro

[android-developers] The import org.apache.http.entity.mime cannot be resolved

2010-12-24 Thread Mystique
Hi, I'm trying out sample example from a book to understand how the code works but I have this error: "The import org.apache.http.entity.mime cannot be resolved" What is that I need to do? 10Q. -- You received this message because you are subscribed to the Google Groups "Android Developers" gr

[android-developers] Re: Basic String Array question :(

2010-12-24 Thread Mystique
Tried ArrayList and it works! On Dec 25, 11:45 am, TreKing wrote: > On Fri, Dec 24, 2010 at 9:32 PM, Mystique wrote: > > This part is essential, if I do not know how many element I have then I > > cannot declare it predefine but declare array without value to be filled > >

[android-developers] Re: Basic String Array question :(

2010-12-24 Thread Mystique
ng android apps. Then, still unable to figure this out... maybe I need some beer :D On Dec 25, 11:08 am, TreKing wrote: > On Fri, Dec 24, 2010 at 8:12 PM, Mystique wrote: > > String[] lv_arr; > > > for(int i=1; i<11; i++){ > >                lv_arr[i] = "hello

[android-developers] Basic String Array question :(

2010-12-24 Thread Mystique
Sorry, if this is too basic and not entirely Android.. but android is part java too, so I don't have to hop forum. I believe someone else might encounter this too. I'm putting some statement in the Android basically reading an xml file and cast the value into an array to be use as listview but I en

[android-developers] Re: loading xml items to an array not working... what is wrong with my code?

2010-12-24 Thread Mystique
I think it is something to do with this. --- if (strName.equals("group")) { String Name = groups.getAttributeValue(null, "name"); lv_arrr[eventType] = Name; --- When I check, Name did contain the correct value. I remember array starts with [0] so I create another counter call i with i++ to re

[android-developers] loading xml items to an array not working... what is wrong with my code?

2010-12-24 Thread Mystique
Hi, I have a xml file call groups.xml. I want to read the value "name" and store in array lv_arrr and load it into an adapter: lv1.setAdapter(new ArrayAdapter(this, R.layout.group_list, R.id.grouplist, lv_arrr)); The program crash during runtime. What did I do wrong in the code can anyone help to

[android-developers] Re: Want to write a forum reader

2010-12-20 Thread Mystique
Thanks TreKing, You are right, been doing my research in google now. Thanks for pointing out the light. On Dec 9, 7:27 am, TreKing wrote: > On Tue, Dec 7, 2010 at 3:11 AM, Mystique wrote: > > Can anyone give me some light what is involve and generally how to do it? > > This

[android-developers] Re: Is it possible to create SQlite with pre-entered data?

2010-12-20 Thread Mystique
any features of SQLite that are more recent than > the version in Android. > > -- Kostya > > 20.12.2010 19:09, Mystique пишет: > > > Hi, > > I want to create a SQlite db with pre-entered data so I can load them > > into a listview. How can this be done? > > >

[android-developers] Is it possible to create SQlite with pre-entered data?

2010-12-20 Thread Mystique
Hi, I want to create a SQlite db with pre-entered data so I can load them into a listview. How can this be done? Many thanks, CJ -- 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@google

[android-developers] Want to write a forum reader

2010-12-07 Thread Mystique
Hi, I've done some Android programming and 2 apps on the market. I'm now thinking to write a simplified mobile reader for a forum. Can anyone give me some light what is involve and generally how to do it? 1. What is it involve to do web sign in? http? any example/code documentation to study? 2. F

[android-developers] How to fix: method getSharedPreferences(String, int) is undefined?

2010-09-23 Thread Mystique
Hi, I have the following code but there is an error: "The method getSharedPreferences(String, int) is undefined for the type EventsData". Does it mean I need to extend both SQLLiteOpenHelper and Activity? How to do that or how to fix this? Many thanks. ---code--- import android.content.Context;

[android-developers] Possible to disable a permission in the program code?

2010-09-20 Thread Mystique
Hi, my app uses Internet permission, is there a way to disable it in the code? Many 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 g

[android-developers] Re: Can ScrollView and Scrollbars in EditText co-exist?

2010-09-19 Thread Mystique
Sounds like a plan but how to do that? Do you mean when I click on the EditText field it open up to a larger window? On Sep 20, 10:08 am, Dianne Hackborn wrote: > Or just let it grow to always show all of its content in the larger scroll > view, as it done in many places in the standard UI (conta

[android-developers] Re: Can ScrollView and Scrollbars in EditText co-exist?

2010-09-19 Thread Mystique
12:56 PM, Mystique wrote: > > Can they co-exist and work together? > > In general, I believe, you cannot (or should not) put auto-scrolling > components inside a ScrollView. > > --- > -- &g

[android-developers] Re: Wrap text for EditText - automatically go to new line?

2010-09-19 Thread Mystique
Ok, I found it. android:scrollHorizontally="false" On Sep 20, 2:07 am, Mystique wrote: > Hi,can I limit the edittext field so it wrap text around the input box > instead of scrolling right unless I hit return? -- You received this message because you are subscribed to t

[android-developers] Wrap text for EditText - automatically go to new line?

2010-09-19 Thread Mystique
Hi,can I limit the edittext field so it wrap text around the input box instead of scrolling right unless I hit return? -- 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

[android-developers] Can ScrollView and Scrollbars in EditText co-exist?

2010-09-19 Thread Mystique
Hi, I have a Dialog implemented with scrollview and a multiline edittext item in the scrollview. I see that I can use the scrollbar in the edittext as the scrollview will take over it. Can they co-exist and work together? Many thanks. -- You received this message because you are subscribed to t

[android-developers] Re: How to do this correctly in SQLite?

2010-09-16 Thread Mystique
Hi String, Thanks for your help. It is working now, learn something new today. Cheers. On Sep 16, 3:04 pm, Mystique wrote: > Hi, sorry about the variable names aren't consistent. > I change it when I paste here to make it readable, my mistake for the > confusion. > > Abou

[android-developers] Re: How to do this correctly in SQLite?

2010-09-16 Thread Mystique
case, your code should be: > >       String temp = "temp"; >       db.execSQL("INSERT INTO " + TABLE_NAME + " VALUES (0 'A', > 'Hello', '', '" + temp + "', '');"); > > On Sep 16, 6:37 am, Mystique wrote:

[android-developers] How to do this correctly in SQLite?

2010-09-15 Thread Mystique
Hi, I want to insert a String value call temp but I don't seems to get it working for the INSERT INTO statement. Anything wrong with the code? This is the initialization to create table and insert some default values into the table if the database doesn't exist. Many Thanks. ---code--- @Overr

[android-developers] Re: Loading raw resource text file hang...

2010-09-15 Thread Mystique
Right, it was suppose to be: while ((strLine = dataIO.readLine()) != null) { sBuffer.append(strLine + "\n"); I don't know why it was change. Thanks you guys. On Sep 16, 3:18 am, DanH wrote: > And, of course, DataInputStream.readLine is deprecated. > > On S

[android-developers] Re: Loading raw resource text file hang...

2010-09-15 Thread Mystique
rote: > On Wed, Sep 15, 2010 at 1:53 PM, Mystique wrote: > > while ((strLine = dataIO.readLine()) != "") { > >            sBuffer.append(strLine + "\n"); > > Thi

[android-developers] Loading raw resource text file hang...

2010-09-15 Thread Mystique
Hi, I use this method couples of occasion to load text file to display as help file. But I don't know why the following code didn't work. It seems to hang and logcat says "OutOfMemoryError"? All I did was break this out as an separate activity... Can anyone help me to catch the problem? ---xml---

[android-developers] onResume is always called on TabActivity so onCreate is not necessary?

2010-09-15 Thread Mystique
Is it suppose to work this way? I have a TabActivity with 3 tabs, each tab started an activity and I realise when a tab is clicked onResume is call. If I have onCreate, when app start it will launch onCreate and then onResume immediately. So, I can just get ride of onCreate in this case? Thanks.

[android-developers] What is the maximum length for text datatype in SQLite?

2010-09-13 Thread Mystique
I can't seems to find this information, anyone know? -- 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+u

[android-developers] Re: How to get value from ListView onListItemClick?

2010-09-12 Thread Mystique
I've solved the refresh listview too :) nice. On Sep 13, 11:42 am, Mystique wrote: > Hi TrekKing, > > I implemented the onCancelListener and have it working good, thanks. > Now need to figure out how to refresh the listview... > > On Sep 13, 3:36 am, TreKing wrote: >

[android-developers] Re: How to get value from ListView onListItemClick?

2010-09-12 Thread Mystique
Hi TrekKing, I implemented the onCancelListener and have it working good, thanks. Now need to figure out how to refresh the listview... On Sep 13, 3:36 am, TreKing wrote: > 2010/9/12 Mystique > > > How to solve this issue? > > 1 - Add an onCancelListener to your dialog that

[android-developers] Re: How to get value from ListView onListItemClick?

2010-09-12 Thread Mystique
Also, my listview doesn't seems to update/refresh with new data until I refresh it manually. How do I refresh the new listview after updating? On Sep 13, 1:28 am, Mystique wrote: > Another question seeking help. > When I click the listview item, I pop up a form as dialog format to &g

[android-developers] Re: How to get value from ListView onListItemClick?

2010-09-12 Thread Mystique
dexOrThrow(UN)) > > On 9月11日, 下午8时37分, Mystique wrote: > > > > > Cancel my last qns, I understood and get it work already :) > > > On Sep 11, 8:32 pm, Mystique wrote: > > > > Dear Mr. Murphy, > > > > Thanks, I understood this part ok > >

[android-developers] Re: Possible to display a string or button on top a listview?

2010-09-12 Thread Mystique
cause it to > expand to whatever size its full contents are.  If you want the list view to > expand to fill all space except the text views above and below, use > android:layout_height="0px" and android:layout_weight="1" on it. > > > > > > On Sat, Sep 11,

[android-developers] Possible to display a string or button on top a listview?

2010-09-11 Thread Mystique
Hi, I can seems to get it write. What is wrong with my layout? ---code--- http://schemas.android.com/apk/res/ android" android:id="@+id/main" android:layout_width="fill_parent" android:layout_height="fill_parent"> -- You received this message because you are subscribed

[android-developers] Re: How to get value from ListView onListItemClick?

2010-09-11 Thread Mystique
Cancel my last qns, I understood and get it work already :) On Sep 11, 8:32 pm, Mystique wrote: > Dear Mr. Murphy, > > Thanks, I understood this part ok > c.moveToPosition(position); // where c is your Cursor > String temp=c.getString(...); // where ... is whatever column numbe

[android-developers] Re: How to get value from ListView onListItemClick?

2010-09-11 Thread Mystique
Sep 11, 8:19 pm, Mark Murphy wrote: > On Sat, Sep 11, 2010 at 8:04 AM, Mystique wrote: > > So if I want to get value of UN, I do this -> String temp = > > moveToPosition(UN)? > > No. > > c.moveToPosition(position); // where c is your Cursor > String temp=c.getStri

[android-developers] Re: How to get value from ListView onListItemClick?

2010-09-11 Thread Mystique
So if I want to get value of UN, I do this -> String temp = moveToPosition(UN)? On Sep 11, 7:55 pm, Mark Murphy wrote: > On Sat, Sep 11, 2010 at 7:54 AM, Mystique wrote: > > Hi, i can add to a db and list as a listview. > > When I click a list item using onListItemClick, w

[android-developers] How to get value from ListView onListItemClick?

2010-09-11 Thread Mystique
Hi, i can add to a db and list as a listview. When I click a list item using onListItemClick, what statement do I need to get the value? Thanks in advance. ---code--- public class Main extends ListActivity { private static String[] FROM = { _ID, DESCRIPTION, UN }; private static S

[android-developers] Re: Why Android cannot play .avi but can play youtube (avi?) and flash?

2010-09-08 Thread Mystique
Traveler you are right, my error. On Sep 9, 1:28 am, Traveler wrote: > I'm not certain, but I think YouTube converts uploaded AVI files to > Flash, or some other format before putting them online. > > On Sep 8, 5:32 am, Mystique wrote: > > > > > Most youtube are

  1   2   >