[android-developers] Custom View
Hi all, I want to create a custom view.In which i want to have a background image,2 buttons,1 textview. Can anybody tell me how to start with. 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
Re: [android-developers] how to startup the emulator with landscape orientation instead of portrait
Try with other ctrl button ... if u have laptop ctrl+fn+F11 this should work ... On Sun, Jun 20, 2010 at 7:59 AM, Jian Chen ustcchenj...@gmail.com wrote: Guys, as u know, since android 1.6, there are not dirs on dirs like HVGA-L. Instead, there is only one dir like HVGA. That is, HVGA-P and HVGA-L are merged into one dir, HVGA. So, only HVGA can be selected and by default the emulator is started with portrait mode. Though I can press CTRL+F11/F12 to switch it to landscape mode, I do not like it. What I want is to start the emulator with default mode of landscape. Would anyone know how to do 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 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] Fix for OutofMemoryError: bitmap size exceeds VM budget
Hi all, in my application i have a functionality where a user can take photo and poet it to a web server or select a photo from galerry and upload. So initially i used to get below exception for the very* first time* i used to select a photo: Android: OutofMemoryError: bitmap size exceeds VM budget . then i used: *options.inSampleSize = 2;* Now the problem is im still getting the same exception ... *the only difference is im getting exception after 2-3 times.* i.e im able to upload 2-3 (one by one) photos and then i get the exception any suggestions ??? -- 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
Re: [android-developers] Re: Placing a bitmap image in ImageView
I tried this method [ Bitmap.createScaledBitmap].. its working ..but the problem is aspect ratio is not maintained ... On Thu, Jun 10, 2010 at 1:12 PM, Goran Genter goran.gen...@gmail.comwrote: On Jun 10, 6:20 am, pawan nimje pawanni...@gmail.com wrote: Can you suggest some method to pre-scale the bitmap. Bitmap bmpScaled = Bitmap.createScaledBitmap(Bitmap bmpSource, 50, 50, true) -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] Make entire screen disabled
thats ok .. i have tried that .. thats working ... but wat i want is the screen to look in background ...i.e i want the entire activity screen to look as if its in the background ( how an sctivity screen looks when theres dilog box above it) ... hope u r getting wat im trying to say ... On Sat, Jun 12, 2010 at 4:59 PM, Mark Murphy mmur...@commonsware.comwrote: On 06/12/2010 12:15 AM, pawan nimje wrote: Hi All, When I click on a button i want to make entire screen disabled ... i.e there are other buttons and text area ..which should get disabled ...on a particular button click ..is it possible ?? Sure. Just disable the other widgets, using setEnabled(false). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 2.2 Programming Books: http://commonsware.com/books -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] Go through the code ans suggest
Below is the code for posting data on a server ... my problem is i want to show a progress dialog when i click on submit button and dismiss it when data is posted ... i have written code for that .. but the thing is the progress dialog comes and goes ... and its hardly noticeable .. i hope u have understood my prob so plz suggest solution ... _ final Button btnSubmit = (Button) findViewById(R.id.submitButton); btnSubmit.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub btnSubmit.setEnabled(false); etPersonName = (EditText) findViewById(R.id.byEditText); etPostText = (EditText) findViewById(R.id.postEditText); b = true; try { String personName = new String(); personName = etPersonName.getText().toString(); String postStr = new String(); postStr = etPostText.getText().toString(); if(personName.length() == 0 || postStr.length() == 0) { Toast.makeText(getApplicationContext(), Message and/or Sender's Name cannot be Blank. , Toast.LENGTH_SHORT).show(); btnSubmit.setEnabled(true); } else { btnSubmit.setEnabled(false); * m_ProgressDialog = ProgressDialog.show(LeaveMessage.this, Please wait..., Saving Post ..., true);* String msgStr = personName + ~ + postStr; String encryptStr = msgStr + + Constants.POST_KEY; String android_id = Secure.getString(cntxt.getContentResolver(), Secure.ANDROID_ID); String sha1Msg = SimpleSHA1.SHA1(encryptStr); Constants.LeaveURL = Constants.BasicLeaveURL; Constants.LeaveURL += ?tp=new; Constants.LeaveURL += message= + msgStr + ; Constants.LeaveURL += key= + sha1Msg + ; if (android_id == null) { Constants.LeaveURL += DeviceId= + 12312 + ; } else { Constants.LeaveURL += DeviceId= + android_id + ; } Constants.LeaveURL += cCode= + Constants.CountryCode; System.out.println(Constants.LeaveURL); URL url = new URL(Constants.LeaveURL); HttpURLConnection conn = (HttpURLConnection)url.openConnection(); conn.setDoInput(true); conn.setDoOutput(true); conn.setUseCaches(false); conn.setRequestMethod(POST); /* setRequestProperty */ conn.setRequestProperty(Connection, Keep-Alive); conn.setRequestProperty(Charset, UTF-8); conn.setRequestProperty(Content-Type, multipart/form-data); DataOutputStream ds = new DataOutputStream(conn.getOutputStream()); if(Constants.takePhoto!=null) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); Constants.takePhoto.compress(Bitmap.CompressFormat.JPEG, 100, baos); byte[] data = baos.toByteArray(); ds.write(data); } Constants.takePhoto=null; ds.flush(); ds.close(); * //m_ProgressDialog.dismiss();* if(conn.getResponseCode() != HttpURLConnection.HTTP_OK){ Toast.makeText(getBaseContext(), conn.getResponseMessage(), Toast.LENGTH_LONG); } else{ * m_ProgressDialog.dismiss();* Toast.makeText(getBaseContext(), Message Posted!!, Toast.LENGTH_LONG); Intent i = new Intent(getApplicationContext(), ReadMessages.class); startActivity(i); } } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }); -- 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] What is the thing which is shown while the image is loaded.
Hi all what is the thing called which is similar to progress dialog ... but for image ( or say image view) and how can i integrate that in the code .. i am attaching the code files __ -- 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 ReadImageThread.java Description: Binary data ReadMessages.java Description: Binary data
[android-developers] Make entire screen disabled
Hi All, When I click on a button i want to make entire screen disabled ... i.e there are other buttons and text area ..which should get disabled ...on a particular button click ..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
Re: [android-developers] Re: Moving from one Activity to another with a pause/delay
Sounds cool ... will try .. On Wed, Jun 9, 2010 at 12:37 PM, String sterling.ud...@googlemail.comwrote: On Jun 9, 5:03 am, pawan nimje pawanni...@gmail.com wrote: any kind of suggestion will do .. In your onClick event put your color changing code and a call to Handler.sendEmptyMessageDelayed(). The latter will reference a Handler you create, with the activity-switching code in its handleMessage() method. String -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] Placing a bitmap image in ImageView
Hi All, I have a Bitmap image (bm) and a an ImageView (iv) of 50 by 50 when i do iv.setImageBitmap(bm) ... only a portion of the entire image is seen ..How can i see the whole image in the 50 dip by 50 dip ImageView .. any suggestion will do .. -- 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
Re: [android-developers] Re: Placing a bitmap image in ImageView
Hi Kumar Bibek, Can you suggest some method to pre-scale the bitmap. Thanks. On Thu, Jun 10, 2010 at 8:24 AM, Kumar Bibek coomar@gmail.com wrote: One tip to save some memory, pre-scale your bitmaps since it's just 50 by 50. This would save a lot of memory, and if you are loading real big images, this can prevent OutOfMemory errors. Thanks and Regards, Kumar Bibek http://tech-droid.blogspot.com On Jun 10, 6:25 am, 楊健 youken1...@gmail.com wrote: Try this method: http://developer.android.com/reference/android/widget/ImageView.html#...) setScaleType( http://developer.android.com/reference/android/widget/ImageView.Scale... ImageView.ScaleType scaleType) Controls how the image should be resized or moved to match the size of this ImageView. _ From: android-developers@googlegroups.com [mailto: android-develop...@googlegroups.com] On Behalf Of pawan nimje Sent: Thursday, June 10, 2010 2:39 AM To: Android Developers Subject: [android-developers] Placing a bitmap image in ImageView Hi All, I have a Bitmap image (bm) and a an ImageView (iv) of 50 by 50 when i do iv.setImageBitmap(bm) ... only a portion of the entire image is seen ..How can i see the whole image in the 50 dip by 50 dip ImageView .. any suggestion will do .. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group athttp:// groups.google.com/group/android-developers?hl=en -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] Moving from one Activity to another with a pause/delay
Hi All, I have* two activities*, *1st one* has a ques and 4 options. *2nd one* is like a result page (... displaying if your ans is correct or not ...and showing the right ans ..) Now what i want is when a user clicks : on a right option [or wrong option] ..i want to turn that Image button into green [ red] .*.and wait for a while* ..and then go to the result activity .. *so my only concern is onclick of a ImageButton ... how to wait for a while .. and then move to other activity* * * any kind of suggestion will do .. -- 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
Re: [android-developers] Passing Bitmap to Another Activity
i dont know how to pass bitmap ... but what you can do is have a public static bitmap in act A and access it from act B .. hopefully this should solve the purpose .. On Mon, Jun 7, 2010 at 11:54 AM, mike hasitharand...@gmail.com wrote: hi guys, i have a Bitmap image and i want to forward the bitmap to another activity. i have two activities Activity A and Activity B this is how i started the Activity B startActivityForResult(new Intent(Activity A.this, Activity B.class), 120); in activity B private void forwardImage(Bitmap bit) { Intent i = new Intent(MMS.this, Compose.class); i.putExtra(MMS, bit); setResult(RESULT_OK, i); finish(); } this is not forwarding to Activity A but if i put a String to the intent it'll forward. this is how i listene to result in Activity A @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { // TODO Auto-generated method stub // super.onActivityResult(requestCode, resultCode, data); switch (resultCode) { case RESULT_OK: Intent intent = getIntent(); Bitmap bitmap = (Bitmap) intent.getParcelableExtra(MMS); mmsImage.setImageBitmap(bitmap); default: break; } } how can i pass a bitmap regards, Mike -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] Camera Portrait
Hi all I am opening camera from my application...and the orientation of camera is Landscape... but i actually want it to be portrait ... im using code from here: http://snippets.dzone.com/user/Jbeer any kind of help will do... 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 use web camera in android emulator ??
Hi All, How can i use web cam with android emulator ?? 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
Re: [android-developers] Application with no title
activity android:name=.MyMainClass android:label=@string/app_name android:theme=@android:style/Theme.NoTitleBar hope this is what you meant. On Sun, May 23, 2010 at 9:33 AM, John Gaby jg...@gabysoft.com wrote: When my application starts, I call: this.requestWindowFeature(Window.FEATURE_NO_TITLE); to get rid of the title bar. I then create a custom ViewGroup and when set that view to be the content view via a call to 'setContentView', the 'onLayout' method of my ViewGroup is called. However, the top position is set to 25, even though I have turned off the title. How can I set my ViewGroup to take up all of the space, including the space formally occupied by the title bar? 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] Re: Set multiple form parameters
I tried using it but was unsuccessful. Can u give the code snippet for the same or suggest some other method. On Fri, May 14, 2010 at 7:20 PM, inbrain inbr...@gmail.com wrote: Doesn't setParams(HttpParams params) method suit you? It is declared in HttpMessage which is one of interfaces implemented by HttpPost On 14 May, 12:40, pawan nimje pawanni...@gmail.com wrote: I want to send a post request. This is what i have done- HttpClient client = new DefaultHttpClient(); HttpPost httpost = new HttpPost(POST_URL); StringEntity se = new StringEntity(j.toString()); httpost.setEntity(se); httpost.setHeader(Accept, application/json); httpost.setHeader(Content-type, application/json); ResponseHandler? responseHandler = new BasicResponseHandler(); Object response = client.execute(httpost, responseHandler); But along with the post request i want to set multiple form parameters of the POST_URL using post request. How do I do that? -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group athttp:// groups.google.com/group/android-developers?hl=en -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] Set android:layout_gravity from code ??
Hi All once again, In xml we have android:layout_gravity ... how can i set this for any view [say image button] ... from code ... plz help ...any kind if suggestion will do .. code: ibMap = new ImageButton(getApplicationContext()); ibMap.setLayoutParams(new LayoutParams(width,height)); ibMap.setBackgroundResource(resId); now i want to set the android:layout_gravity from code ... -- 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] Set android:layout_gravity from code ??
Hi All once again, In xml we have android:layout_gravity ... how can i set this for any view [say image button] ... from code ... plz help ...any kind if suggestion will do .. code: ibMap = new ImageButton(getApplicationContext()); ibMap.setLayoutParams(new LayoutParams(width,height)); ibMap.setBackgroundResource(resId); now i want to set the android:layout_gravity from code ... -- 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] Set multiple form parameters
I want to send a post request. This is what i have done- HttpClient client = new DefaultHttpClient(); HttpPost httpost = new HttpPost(POST_URL); StringEntity se = new StringEntity(j.toString()); httpost.setEntity(se); httpost.setHeader(Accept, application/json); httpost.setHeader(Content-type, application/json); ResponseHandler? responseHandler = new BasicResponseHandler(); Object response = client.execute(httpost, responseHandler); But along with the post request i want to set multiple form parameters of the POST_URL using post request. How do I do that? -- 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] Set multiple form parameters
I want to send a post request. This is what i have done- HttpClient client = new DefaultHttpClient(); HttpPost httpost = new HttpPost(POST_URL); StringEntity se = new StringEntity(j.toString()); httpost.setEntity(se); httpost.setHeader(Accept, application/json); httpost.setHeader(Content-type, application/json); ResponseHandler? responseHandler = new BasicResponseHandler(); Object response = client.execute(httpost, responseHandler); But along with the post request i want to set multiple form parameters of the POST_URL using post request. How do I do that? -- 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] Activity based Tabs
Hi All, I have Activity based tabs...i.e i have used TabActivity,tabhost etc Now when we switch between the tabs, for the 1st time the oncreate is called and then after the onResume methode is called I want to know what event/function, of the activity, is called when i click on the the tab which is already selected. -- 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] Fwd: Activity based Tabs
Hi All, I have Activity based tabs...i.e i have used TabActivity,tabhost etc Now when we switch between the tabs, for the 1st time the oncreate is called and then after the onResume methode is called I want to know what event/function, of the activity, is called when i click on the the tab which is already selected. -- 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] Having a back button functioning like the emulators
Hi all I have 3 activities 1: Welcome screen 2:List of country 3:Details abt that country Now i want to from activity 3 to 2 Currently wat im doing is Intent i = new Intent(getApplicationContext(), selectcountry.class); startActivity(i); This way the onCreate methode of 2nd activity is called ... and the whole list is populated again ... But the back button of emulated function differently ... wat code should i write to make my back button behave like the emulators ... -- 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] Go back to previous activity
I want to go back to previous activity What code should i write for back button plz dont suggest Intent i = new Intent(Constants.CountryContext, selectcountry.class); startActivity(i); This creates the whole activity again ... which i dont want .. i want somthing like emulators back button .. -- 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
Re: [android-developers] Go back to previous activity
By Intent i = new Intent(Constants.CountryContext, selectcountry.class); startActivity(i); i meant Intent i = new Intent(getApplicationContext(), SomeClass.class); startActivity(i); On Mon, May 10, 2010 at 9:59 PM, TreKing treking...@gmail.com wrote: On Mon, May 10, 2010 at 11:24 AM, pawan nimje pawanni...@gmail.comwrote: I want to go back to previous activity What code should i write for back button How about finish() ? plz dont suggest Intent i = new Intent(Constants.CountryContext, selectcountry.class); startActivity(i); I have no idea what ContryContext or selectcountry.class are. Why in the world would anyone suggest that? - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] Go back to previous activity
yup ... finish() is working ... hey Treking ... is there any way to find out the contents of Activity Stack .. i.e getting the name and position of Activities ... and den bringing forward any of the activities .. plz help .. On Mon, May 10, 2010 at 9:59 PM, TreKing treking...@gmail.com wrote: On Mon, May 10, 2010 at 11:24 AM, pawan nimje pawanni...@gmail.comwrote: I want to go back to previous activity What code should i write for back button How about finish() ? plz dont suggest Intent i = new Intent(Constants.CountryContext, selectcountry.class); startActivity(i); I have no idea what ContryContext or selectcountry.class are. Why in the world would anyone suggest that? - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] Having a back button functioning like the emulators
sorry and thank u ... On Mon, May 10, 2010 at 10:03 PM, TreKing treking...@gmail.com wrote: On Mon, May 10, 2010 at 11:09 AM, pawan nimje pawanni...@gmail.comwrote: wat code should i write to make my back button behave like the emulators ... finish(). And please don't double post - it's really unnecessary. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] Go back to previous activity
The resone why i want all this is ... what im wanting is since all those activities are already created ... on button click i jus want to switch [jump] to those activities ... instead of using the startActivity(intent) method ...anyways forget it and thnx for the help On Mon, May 10, 2010 at 10:47 PM, TreKing treking...@gmail.com wrote: On Mon, May 10, 2010 at 11:46 AM, pawan nimje pawanni...@gmail.comwrote: hey Treking ... is there any way to find out the contents of Activity Stack .. There should be a most recently used list somewhere - dig around the documentation (ApplicationInfo, Packagemanager, etc would be likely culprits). i.e getting the name and position of Activities ... and den bringing forward any of the activities .. You probably won't be able to directly access other activities to bring them to the front, though you could theoretically start those activities with the proper intent. All this begs the question of why you want to do this anyway? - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] Check The Pic and comment
Hi All, Check the image attached and let me know if its possible ... 6 tabs ... 4 above and 2 below ... and if yes .. how?? PS : i have created 4 tabs [all above :) ] using extends TabActivity,tabhost etc . -- 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=enattachment: demo.JPG
[android-developers] Check The Pic and comment
Hi All, Check the image attached and let me know if its possible ... 6 tabs ... 4 above and 2 below ... and if yes .. how?? PS : i have created 4 tabs [all above :) ] using extends TabActivity,tabhost etc . -- 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=enattachment: demo.JPG
[android-developers] Serious Issue
Hi All, Currently I have a TabHost implemented with 3 tabs each containing a separate activity. My question is how do I switch between tabs from within one of the activities that is located inside the tab host. ie say i have a button inside one of the tabs[tab 1], when i click on this button it should switch to another tab[tab 2]. To understand my problem click on the link below, http://stackoverflow.com/questions/2541802/android-switch-tabs-from-within-an-activity-within-a-tab plz help ...any kind of suggestion will do ... -- 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] Very weird problem !!
Hi all, i have a listview [custom (2 textview and 1 image) ] and i have a filter(featues 1) for it i.e when i type a in a textview (other than the above 2 mentioned) the list contains only those name starting with a . and i also have ascending / descending (features 2) button which when clicked sorts the given list. both these features aur running fine But after im done using the filter, the asc/desc buttons dont work the on click listener gets called but the list is not sorted if any one have come accross this prob help me any kind of suggestion will do ... -- 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] Serious Issue
Hi All, Currently I have a TabHost implemented with 3 tabs each containing a separate activity. My question is how do I switch between tabs from within one of the activities that is located inside the tab host. ie say i have a button inside one of the tabs[tab 1], when i click on this button it should switch to another tab[tab 2]. To understand my problem click on the link below, http://stackoverflow.com/questions/2541802/android-switch-tabs-from-within-an-activity-within-a-tab plz help ...any kind of suggestion will do ... -- 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] Very weird problem !!
Hi all, i have a listview [custom (2 textview and 1 image) ] and i have a filter(featues 1) for it i.e when i type a in a textview (other than the above 2 mentioned) the list contains only those name starting with a . and i also have ascending / descending (features 2) button which when clicked sorts the given list. both these features aur running fine But after im done using the filter, the asc/desc buttons dont work the on click listener gets called but the list is not sorted if any one have come accross this prob help me any kind of suggestion will do ... -- 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: Very weird problem !!
Hi all, i have a listview [custom (2 textview and 1 image) ] and i have a filter(featues 1) for it i.e when i type a in a textview (other than the above 2 mentioned) the list contains only those name starting with a . and i also have ascending / descending (features 2) button which when clicked sorts the given list. both these features aur running fine But after im done using the filter, the asc/desc buttons dont work the on click listener gets called but the list is not sorted if any one have come accross this prob help me any kind of suggestion will do ... -- 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 get dimensions of image
Hi i have a image in drawable folder and i need to get dimensions of that image. i tried BitmapFactory,getHeight etc but it is retunning me null plz 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
Re: [android-developers] How to get dimensions of image
will try that ... On Fri, May 7, 2010 at 5:28 PM, Mark Murphy mmur...@commonsware.com wrote: pawan nimje wrote: Hi i have a image in drawable folder and i need to get dimensions of that image. i tried BitmapFactory,getHeight etc but it is retunning me null getResources().getDrawable().getIntrinsicHeight() (or getMinimumHeight(), depending on what it is you are trying to do) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Online Training: 10-14 May 2010: http://onlc.com -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] Re: How to get dimensions of image
hey pskink u got me wrong ... i did not use BitmapFactory,getHeight ... i jus wanted to let know that i have used all the [bitmap,bitmapfactory,getHeight,getWidth etc] and it gave nullpointer exception so plz suggest some other method On Fri, May 7, 2010 at 5:36 PM, skink psk...@gmail.com wrote: On May 7, 9:42 am, pawan nimje pawanni...@gmail.com wrote: Hi i have a image in drawable folder and i need to get dimensions of that image. i tried BitmapFactory,getHeight etc but it is retunning me null plz help -- BitmapFactory,getHeight() cannot return null since there is no such method there is a method Bitmap,getHeight() but it cannot either return null as it returns int pskink -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] On click enlarge the image
Hi All, I have a textview and an imagebutton. textview has the description about the image[which is there in imagebutton] Now on clickin the image button i want the imagebutton to occupy the whole screen and on clicking this i want the imagebutton back to normal position plz 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
Re: [android-developers] On click enlarge the image
hey trekingapp, tell me how can i set x,y co-ordinate of any view [in my case imagebutton] from code i.e dynamically/programatically - the below code wont work because its part of a application activity:: -- public class About extends Activity { TextView tvDesc = null; ImageButton ibMap = null; private countrydata cntrydata = new countrydata(this); @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.about2); tvDesc = (TextView) findViewById(R.id.tvDesc); ibMap = (ImageButton)findViewById(R.id.ibMap); tvDesc.setText(CountryDescription); int resId = getResources().getIdentifier(in_map, drawable, pkg.DestMsgs); ibMap.setBackgroundResource(resId); ibMap.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { //here i have to write code for enlarging the imagebutton } }); } } -- this is my xml : ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:background=@color/white AbsoluteLayout android:layout_width=fill_parent android:layout_height=fill_parent android:background=# ScrollView android:layout_x=20dip android:layout_y=20dip android:layout_height=141dip android:layout_width=280dip TextView android:id=@+id/tvDesc android:layout_width=fill_parent android:layout_height=fill_parent android:background=@color/white android:textColor=@color/black /TextView /ScrollView ImageButton android:id=@+id/ibMap android:layout_x=20dip android:layout_y=180dip android:layout_width=280dip android:layout_height=140dip /ImageButton TextView android:id=@+id/tvTouch android:layout_x=20dip android:layout_y=320dip android:text=@string/touch android:gravity=center android:textColor=@color/black /TextView /AbsoluteLayout /RelativeLayout --- On Fri, May 7, 2010 at 12:41 AM, TreKing treking...@gmail.com wrote: On Thu, May 6, 2010 at 1:04 PM, pawan nimje pawanni...@gmail.com wrote: plz help ... With what? You didn't actually ask a question, indicate which part SPECIFICALLY you're having trouble with, or what you have already tried that isn't working. There are a myriad of different things you could do depending on what EXACTLY you're trying to do (popup, separate activity, enlarge the button itself, etc ). Clarify you question and maybe you'll get a good response. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] Change text size and color of listview
hi, the below given listview goes black[not permanently] on touch and scroll. plz help On Fri, Apr 30, 2010 at 11:40 PM, pawan nimje pawanni...@gmail.com wrote: hey thanks pal it worked On Fri, Apr 30, 2010 at 11:22 PM, Mark Murphy mmur...@commonsware.comwrote: pawan nimje wrote: Hi all, I am adding listview programmatically. My code is as follow. --- start LinearLayout llIn2 = new LinearLayout(this); llIn2.setOrientation(LinearLayout.VERTICAL); llIn2.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); ListView lv = new ListView(this); lv.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); lv.setAdapter(new ArrayAdapterString(getApplicationContext(), android.R.layout.simple_list_item_1, alPlaces)); llIn2.addView(lv); this.setContentView(llIn2); --end now i want to change the size and color of text. [there is know method like lv.settextsize / lv.settextcolor ] You need to change the rows, not the ListView. Instead of using android.R.layout.simple_list_item_1, create your own row layout that is styled the way you want it to be. Here is an excerpt from one of my books that covers this process: http://commonsware.com/Android/excerpt.pdf -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] Re: Change text size and color of listview
Hi kumar bibek, thnx man ... it worked .. btw where r u from.. -Pawan Nimje On Thu, May 6, 2010 at 12:24 AM, Kumar Bibek coomar@gmail.com wrote: Set this property for the List view #colorCacheHint = # Thanks and Regards, Kumar Bibek On May 5, 11:41 pm, pawan nimje pawanni...@gmail.com wrote: hi, the below given listview goes black[not permanently] on touch and scroll. plz help On Fri, Apr 30, 2010 at 11:40 PM, pawan nimje pawanni...@gmail.com wrote: hey thanks pal it worked On Fri, Apr 30, 2010 at 11:22 PM, Mark Murphy mmur...@commonsware.com wrote: pawan nimje wrote: Hi all, I am adding listview programmatically. My code is as follow. --- start LinearLayout llIn2 = new LinearLayout(this); llIn2.setOrientation(LinearLayout.VERTICAL); llIn2.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); ListView lv = new ListView(this); lv.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); lv.setAdapter(new ArrayAdapterString(getApplicationContext(), android.R.layout.simple_list_item_1, alPlaces)); llIn2.addView(lv); this.setContentView(llIn2); --end now i want to change the size and color of text. [there is know method like lv.settextsize / lv.settextcolor ] You need to change the rows, not the ListView. Instead of using android.R.layout.simple_list_item_1, create your own row layout that is styled the way you want it to be. Here is an excerpt from one of my books that covers this process: http://commonsware.com/Android/excerpt.pdf -- Mark Murphy (a Commons Guy) http://commonsware.com|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- 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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group athttp:// groups.google.com/group/android-developers?hl=en -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] Change text size and color of listview
Hi all, I am adding listview programmatically. My code is as follow. --- start LinearLayout llIn2 = new LinearLayout(this); llIn2.setOrientation(LinearLayout.VERTICAL); llIn2.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); ListView lv = new ListView(this); lv.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); lv.setAdapter(new ArrayAdapterString(getApplicationContext(), android.R.layout.simple_list_item_1, alPlaces)); llIn2.addView(lv); this.setContentView(llIn2); --end now i want to change the size and color of text. [there is know method like lv.settextsize / lv.settextcolor ] Any kind of help will be grateful Thanks, Pawan -- 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
Re: [android-developers] Change text size and color of listview
hey thanks pal it worked On Fri, Apr 30, 2010 at 11:22 PM, Mark Murphy mmur...@commonsware.comwrote: pawan nimje wrote: Hi all, I am adding listview programmatically. My code is as follow. --- start LinearLayout llIn2 = new LinearLayout(this); llIn2.setOrientation(LinearLayout.VERTICAL); llIn2.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); ListView lv = new ListView(this); lv.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); lv.setAdapter(new ArrayAdapterString(getApplicationContext(), android.R.layout.simple_list_item_1, alPlaces)); llIn2.addView(lv); this.setContentView(llIn2); --end now i want to change the size and color of text. [there is know method like lv.settextsize / lv.settextcolor ] You need to change the rows, not the ListView. Instead of using android.R.layout.simple_list_item_1, create your own row layout that is styled the way you want it to be. Here is an excerpt from one of my books that covers this process: http://commonsware.com/Android/excerpt.pdf -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] View on Tabs in TabActivity
Hey pankaj can you mail me your project i'll look into it n may i can help you .. -Pawan Nimje On Thu, Apr 22, 2010 at 4:32 PM, Pankaj Deshpande pcdeshpande...@gmail.comwrote: Hi all, I am working on a tab activity, and want images on each tab. I set indicators as a view and set Image as background resource to each tab. For each tab, I have started a new Activity and put a textview as a setContentView in that. Up to my second last tab it works fine, but for lats tab, all tabs cover my whole screen. Why is this happening? Thanks in Advance. Pankaj Deshpande. -- Android Application Developer Pune. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] Fwd: Filter for Custom ListView
Hi, I am having a custom listview [list with image and 2 textbox] and i want to apply filter for it. desc of cust listview: 1:Image i.e flag of country 2:1st textbox (name of country) 3:2nd textbox (name of continent) so when i write i in a textbox [different from the ones mentioned above] i want the list to get filtered according to country name. My code details: 1:_row.xml [each row of list]__ ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=?android:attr/listPreferredItemHeight android:padding=6dip ImageView android:id=@+id/icon android:layout_width=wrap_content android:layout_height=wrap_content android:layout_marginRight=6dip/ !--android:src=@drawable/icon /-- LinearLayout android:orientation=vertical android:layout_width=0dip android:layout_weight=1 android:layout_height=35dip TextView android:id=@+id/toptext android:layout_width=fill_parent android:layout_height=0dip android:layout_weight=1 android:gravity=center_vertical / TextView android:layout_width=fill_parent android:layout_height=0dip android:layout_weight=1 android:id=@+id/bottomtext android:singleLine=true android:ellipsize=marquee / /LinearLayout /LinearLayout 2:__main.xml_ ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent EditText android:id=@+id/search_box android:layout_width=fill_parent android:layout_height=wrap_content android:hint=type to filter android:inputType=text android:maxLines=1/ ListView android:id=@+id/android:list android:layout_width=fill_parent android:layout_height=fill_parent / TextView android:id=@+id/android:empty android:layout_width=fill_parent android:layout_height=fill_parent android:text=@string/main_no_items/ /LinearLayout 3:___softwarepassionview.java___ package com.softberries.lve; import java.util.ArrayList; //import com.TryFilter.R; import android.app.ListActivity; import android.app.ProgressDialog; import android.content.Context; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.View.OnClickListener; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.Filter; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import android.widget.AdapterView.OnItemClickListener; import android.widget.Filter.FilterListener; public class SoftwarePassionView extends ListActivity{ private ProgressDialog m_ProgressDialog = null; private ArrayListOrder m_orders = null; private OrderAdapter m_adapter; private Runnable viewOrders; private EditText filterText = null; ArrayAdapterString adapter = null; ArrayListString data = new ArrayListString(); LayoutInflater vi; View v; TextView tt; TextView bt; ImageView iv; ListView lv; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); //--- data.add(India); data.add(US); data.add(Pak); filterText = (EditText) findViewById(R.id.search_box); filterText.addTextChangedListener(filterTextWatcher); adapter = new ArrayAdapterString(this, R.id.toptext, data); //--- m_orders = new ArrayListOrder(); this.m_adapter = new OrderAdapter(this, R.layout.row, m_orders); setListAdapter(this.m_adapter); viewOrders = new Runnable(){ @Override public void run() { getOrders(); } }; Thread thread = new Thread(null, viewOrders, MagentoBackground); thread.start(); m_ProgressDialog = ProgressDialog.show(SoftwarePassionView.this, Please wait..., Retrieving data ..., true); // lv = (ListView)findViewById(android.R.id.list); lv.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView? arg0, View arg1, int arg2, long arg3) { // TODO Auto-generated method stub
[android-developers] Filter for Custom ListView
Hi, I am having a custom listview [list with image and 2 textbox] and i want to apply filter for it. desc of cust listview: 1:Image i.e flag of country 2:1st textbox (name of country) 3:2nd textbox (name of continent) so when i write i in a textbox [different from the ones mentioned above] i want the list to get filtered according to country name. My code details: 1:_row.xml [each row of list]__ ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=?android:attr/listPreferredItemHeight android:padding=6dip ImageView android:id=@+id/icon android:layout_width=wrap_content android:layout_height=wrap_content android:layout_marginRight=6dip/ !--android:src=@drawable/icon /-- LinearLayout android:orientation=vertical android:layout_width=0dip android:layout_weight=1 android:layout_height=35dip TextView android:id=@+id/toptext android:layout_width=fill_parent android:layout_height=0dip android:layout_weight=1 android:gravity=center_vertical / TextView android:layout_width=fill_parent android:layout_height=0dip android:layout_weight=1 android:id=@+id/bottomtext android:singleLine=true android:ellipsize=marquee / /LinearLayout /LinearLayout 2:__main.xml_ ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent EditText android:id=@+id/search_box android:layout_width=fill_parent android:layout_height=wrap_content android:hint=type to filter android:inputType=text android:maxLines=1/ ListView android:id=@+id/android:list android:layout_width=fill_parent android:layout_height=fill_parent / TextView android:id=@+id/android:empty android:layout_width=fill_parent android:layout_height=fill_parent android:text=@string/main_no_items/ /LinearLayout 3:___softwarepassionview.java___ package com.softberries.lve; import java.util.ArrayList; //import com.TryFilter.R; import android.app.ListActivity; import android.app.ProgressDialog; import android.content.Context; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.View.OnClickListener; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.Filter; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import android.widget.AdapterView.OnItemClickListener; import android.widget.Filter.FilterListener; public class SoftwarePassionView extends ListActivity{ private ProgressDialog m_ProgressDialog = null; private ArrayListOrder m_orders = null; private OrderAdapter m_adapter; private Runnable viewOrders; private EditText filterText = null; ArrayAdapterString adapter = null; ArrayListString data = new ArrayListString(); LayoutInflater vi; View v; TextView tt; TextView bt; ImageView iv; ListView lv; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); //--- data.add(India); data.add(US); data.add(Pak); filterText = (EditText) findViewById(R.id.search_box); filterText.addTextChangedListener(filterTextWatcher); adapter = new ArrayAdapterString(this, R.id.toptext, data); //--- m_orders = new ArrayListOrder(); this.m_adapter = new OrderAdapter(this, R.layout.row, m_orders); setListAdapter(this.m_adapter); viewOrders = new Runnable(){ @Override public void run() { getOrders(); } }; Thread thread = new Thread(null, viewOrders, MagentoBackground); thread.start(); m_ProgressDialog = ProgressDialog.show(SoftwarePassionView.this, Please wait..., Retrieving data ..., true); // lv = (ListView)findViewById(android.R.id.list); lv.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView? arg0, View arg1, int arg2,