[android-developers] Re: How to know it's week when input random date?
I'm a beginner of Android 1. I found java.util.Date , but don't know how to use...Could you show me a simple ex.? 2. how to convert them to Julian dates? --~--~-~--~~~---~--~~ 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] Re: How to send a MessageBox when select a Menu item?
oh~~ 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] Re: How to use setOnItemClickListener ?
- -! sorry for such a stupid question. --~--~-~--~~~---~--~~ 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] Re: How to set some lists in one layout?
It's very helpful for me. Thanks for help.there is another problem I can display lists, but I don't know how to set onItemClickListener ? --~--~-~--~~~---~--~~ 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] Re: How to set some lists in one layout?
How do we get data from DB to the list?If I use setListAdapter I can get data from DB like this : Cursor notesCursor = mDbHelper.fetchAllNotes(); startManagingCursor(notesCursor); String[] from = new String[]{NotesDbAdapter.KEY_TITLE}; int[] to = new int[]{R.id.text1}; SimpleCursorAdapter notes = new SimpleCursorAdapter(this, R.layout.notes_row_weekly, notesCursor, from, to); setListAdapter(notes); If use ls1.setList(); how to get data? --~--~-~--~~~---~--~~ 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] Re: How to set some lists in one layout?
If I write list ids like that I can't show list where I want to.I have to separate id to two ListView . ls1.setAdapter(notes); ls2.setAdapter(notes); this is not working. I should set list with setListAdapter, but ListView does not support setListAdaper. ls1.setListAdapter(notes);//The method setListAdapter(SimpleCursorAdapter) is undefined for the type ListView how to solve this problem ? --~--~-~--~~~---~--~~ 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] Re: How to set some lists in one layout?
Can you show me a simple ex.? Actually I don't know how to use multiple ListView widget. If this is two lists in main xml. ListView ls1=(ListView)findViewById(R.id.list1); ListView ls2=(ListView)findViewById(R.id.list2); then how to set List? ??? SimpleCursorAdapter notes = new SimpleCursorAdapter(this, R.layout.notes_row_weekly, notesCursor, from, to); setListAdapter(notes); ??? --~--~-~--~~~---~--~~ 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] Re: Many Lists in one Layout ?
Sorry for that I can't understand the source code you give totally. Did you have looked the sample in the Android named Notepad? It use SimpleCursorAdapter. Get cursor from NotesDbAdapter first. and use setListAdapter() to set list. It only recognize the first ListView of setContentView(R.layout.main) in onCreate method. Is it possible to set two or more lists in this way? here is source code about set list. Cursor notesCursor = mDbHelper.fetchAllNotes(); startManagingCursor(notesCursor); String[] from = new String[]{NotesDbAdapter.KEY_TITLE}; int[] to = new int[]{R.id.text1}; SimpleCursorAdapter notes = new SimpleCursorAdapter(this, R.layout.notes_row_weekly, notesCursor, from, to); setListAdapter(notes); --~--~-~--~~~---~--~~ 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] Re: About SQLite (query)
Thanks for help...I have already figure it out, thank you anyway. --~--~-~--~~~---~--~~ 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] Re: About SQLite (query)
How to use rawQuery with Variable? Cursor mCursor = mDb.rawQuery("select * from notes2 where title=\"title1\"", null); it's worked but I want to use variable instead of String... like this String str = "title1"; Cursor mCursor = mDb.rawQuery("select * from notes2 where title= str", null); it's stopped unexpected. Could anyone tell me how to use? --~--~-~--~~~---~--~~ 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] Re: How to get id of array in spinner
Oh,, I just found the problem. I have already change s.getSelectedItemPosition() to position... but it still didn't work. It wasn't a spinner problem. The problem was that the way I called class. Thank you for help. --~--~-~--~~~---~--~~ 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] Re: How to get id of array in spinner
would you mind show me an simple example about using setOnItemSelected() method with position parameter? --~--~-~--~~~---~--~~ 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] Re: How to get id of array in spinner
It had exception error, something wrong with code, but i can't find out. Is there anyone help me? thank you private Spinner s; s = (Spinner) findViewById(R.id.dailylog_type); ArrayAdapter adapter = ArrayAdapter.createFromResource( this, R.array.planets_type, android.R.layout.simple_spinner_item); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); s.setAdapter(adapter); s.setOnItemSelectedListener(selectListener); private Spinner.OnItemSelectedListener selectListener = new OnItemSelectedListener() { public void onItemSelected(AdapterView parent, View v, int position, long id) { int pos = s.getSelectedItemPosition(); switch (pos) { case 1: Intent i_1 = new Intent(class1.this,class2.class); startActivity(i_1); break; case 2: Intent i_2 = new Intent(class1.this,class3.class); startActivity(i_2); break; } } public void onNothingSelected(AdapterView arg0) {} }; --~--~-~--~~~---~--~~ 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] Re: How to get id of array in spinner
I tried but,, it was not working,,, Someone on the internet said spinner doesn't support setOnItemClickListener(new OnItemClickListener() Is it true ? if it's true how do we set OnItemClickListener? --~--~-~--~~~---~--~~ 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] Re: How to show two or more fields to list(Notepad Tutorial)?
Oh,,, i solved vertical problem,, change vertical to horizontal in xml file, it was working.But I still in trouble with add String to the list. --~--~-~--~~~---~--~~ 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] Re: How to show two or more fields to list(Notepad Tutorial)?
Thank you very very much~~ can I ask some another question? I saw list was vertical. like this... title1 name1 -- title2 name2 I wanna change to like this. title1 name1 -- title2 name2 and how to add String to list? like 5-11-2009 --- 5-11-2009 Meeting first field is startTime, and second is endTime, last one is Title. is it possible? --~--~-~--~~~---~--~~ 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] Re: How to show two or more fields to list(Notepad Tutorial)?
Thank you for help... I tried, but it doesn't work.I wrote xml file like this... it has no error on it... http://schemas.android.com/apk/res/android"; android:layout_width="wrap_content" android:layout_height="wrap_content"> and change code like you told. String[] from = new String[]{NotesDbAdapter.KEY_TITLE, NotesDbAdapter.KEY_NAME}; int[] to = new int[]{R.id.text1, R.id.text2}; --~--~-~--~~~---~--~~ 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] Re: How to get current date ??
In Android we can get current date like this : private TextView mDateDisplay; private Button mPickDate; private int mYear; private int mMonth; private int mDay; static final int DATE_DIALOG_ID = 0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // capture our View elements mDateDisplay = (TextView) findViewById(R.id.dateDisplay); mPickDate = (Button) findViewById(R.id.pickDate); // add a click listener to the button mPickDate.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { showDialog(DATE_DIALOG_ID); } }); // get the current date final Calendar c = Calendar.getInstance(); mYear = c.get(Calendar.YEAR); mMonth = c.get(Calendar.MONTH); mDay = c.get(Calendar.DAY_OF_MONTH); // display the current date updateDisplay(); } --~--~-~--~~~---~--~~ 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] Re: How to get current date ??
Thanks for help, but I already completely done, I think Android is different from Java about get current date. Android site gives source exactly i want. --~--~-~--~~~---~--~~ 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] Re: How to get current date ??
Oh~~~ my mistake, i'm just a beginner of android. I missed that part.Thanks for reply~ --~--~-~--~~~---~--~~ 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] Re: How to change RadioButton size???
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] How to change RadioButton size?
How to change RadioButton size? It's too large. I want a small radioButton... --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---