[android-developers] Re: How to set the color of listView unused area in 2.3.3

2011-07-24 Thread andrew
Are you sure that area is part of your listview, and not the layout
that contains it due to the list view height being determined by it's
contents?

I.e. I am not sure listview has any "unused area"

If so, change the background color of layout containing the list view
to match the list view color.

-- 
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: Offering free and paid APKs on the Market

2011-07-24 Thread keyboardr
Honestly, you'll probably do better to have a single .apk and use an
in-app purchase to do the free to paid conversion.  There was another
thread on here that discussed this extensively.

On Jul 24, 2:34 am, Davy  wrote:
> Hi,
>
> I'm thinking about offering a free / paid version of my app on the Market. I
> currently only have a paid application on the market (let's assume the
> current version on the market is called com.myapp).
> The idea would be to strip off some of the functionality in the free
> version. I'm thinking about the following approach :
>
> Starting from my current (and only) Eclipse project called com.myapp (using
> package com.myapp), I would :
>
> Move most of functionality into a new library project, using a new package
> com.myapp.common. This project would include most the current classes from
> my project.
> A lot of activities / broadcastreceivers / services would become abstract in
> the com.myapp.common project.
> Some redesign/refactoring would be in order so that the free/paid version
> can extend from these abstract classes to drive the logic correctly (free vs
> paid).
> Introduce a MyAppPro (using package com.myapp - to keep it aligned with the
> current version in the market)
> Introduce a MyAppLite (using package com.myapp.lite)
>
> I did a small POC and this approach seems to work to a certain degree. I can
> subclass where needed to provide additional functionality, and can also
> override certain layouts where needed.
>
> However, I was wondering if there were some good scenarios to cover the
> following :
>
> I use intents a lot to do both internal communication in my app, and
> exposing functionality to the outside world. If I have both a free and paid
> version of the app, how do I avoid that these 2 start to interfere.
> I have widgets in both the free and paid version. Free version widgets are a
> subset of the paid version. If a user has both the free and paid version
> installed, how do I avoid that the users sees duplicate widgets?
> I register a lot of broadcast-receivers. Again duplicates will come into the
> picture here. Do I need to ensure that in my free / paid version, the intent
> filters are properly "name-spaced" that they don't interfere with each
> other, to avoid that both the free and paid version starts picking up
> certain intents ?
> I register a lot of activities with an intent-filter (used for "share/send"
> functionality). How do I avoid mixing both the free / paid version.
>
> Is there a way to detect that a users has both the free app / paid app
> installed, and in that case, somehow deactivate the free version ? Are there
> any design patterns / out-of-the-box solutions for that ? Also, any pointers
> to existing resources would be great.
>
> Another approach that was thinking off was to just make the current version
> free, and use in-app-billing to turn it into a fully functional paid
> version.
> However, that would be difficult as I think there is no way to automatically
> convert my existing paid user-base. These would then all of a sudden get a
> free version with limited functionality when they update the app, and would
> have to go through the in-app-billing process (paying twice) to get the full
> functionality.
>
> Regards,
> Davy

-- 
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] Compiling an app with JAR files or else ...

2011-07-24 Thread Emre A. Yavuz

Thanks Mark ...
 
Emre
 

> From: mmur...@commonsware.com
> Date: Sun, 24 Jul 2011 17:21:23 -0400
> Subject: Re: [android-developers] Compiling an app with JAR files or else ...
> To: android-developers@googlegroups.com
> 
> On Sun, Jul 24, 2011 at 5:14 PM, Emre A. Yavuz  wrote:
> > We have an application which runs as an Android Service in the background.
> > Let's assume that we would like to have another application (an activity
> > rather than a service this time) which is supposed to bind to this service
> > (assuming that the service is already up and running when this application
> > is started). The binding is provided through callback functions (as if the
> > service provides an API for any application that wants to bind to it).
> >
> > When someone needs to compile an application of this sort, they either need
> > to have the source code or the JAR files of the service.
> 
> No. They just need to have the AIDL file.
> 
> > We would like to
> > keep the source code to ourselves so I was wondering what the most
> > convenient way is to distribute the code for the service for anyone to
> > compile their applications that bind to it.
> 
> Just distribute the AIDL file.
> 
> > Is there any way to compile an app using
> > an apk of another (the service application in this case) in Eclipse ?
> 
> No.
> 
> -- 
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
> 
> Android Training in NYC: http://marakana.com/training/android/
> 
> -- 
> 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
  

-- 
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] SharedUserId: Things that Cannot Change http://android-developers.blogspot.com/2011/06/things-that-cannot-change.html

2011-07-24 Thread Nikolay Elenkov
On Mon, Jul 25, 2011 at 12:39 PM, Greg Giacovelli  wrote:
> Would SharedUserId be worth calling out. I currently don't have one set on
> any of my apps, but after playing around with the feature while trying to
> get a Test Project to run as the same user ...  I think it's not really
> possible to change the user_id with a live app without some big issues.

If sharedUserId was not set, and you set it afterwards, the UID of the
app changes. I think it's mentioned somewhere in the docs, but can't
seem to find the reference. So, basically, if you want to have two
(or more) apps with a shared UID, you have to design for this in
advance. E.g., release one app with sharedUserId="foo" and the next
one with the same. There is an open issue though:

http://code.google.com/p/android/issues/detail?id=1227

>
> However even with my idea of making a release with world writable files, I
> don't believe I would ever be able to create new files within
> /data/data/. I am wondering that if the package name has to be
> unique anyways for the package manager, why they just didn't make the
> default user_id the package_name of the app. Then with the correct signing
> cert and agreed upon name you would be able to migrate to a userid if need
> be.
> ... Or am I completely wrong?

Interesting proposition. It does seem that the system manages shared UIDs
differently from 'regular' ones, so maybe that's the reason this hasn't been
 (can't?) be done?

-- 
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: Facebook Integration issue

2011-07-24 Thread gaurav gupta
Hi Shanmugam,
Thanks For ur reply.
Facebook Updation creates problem in previous code.
i solved this problem, but still i failed to implement SSO.
Without SSO it will work.
Check this discussion.

https://github.com/facebook/facebook-android-sdk/issues/191

Let me know if u get any solution regarding SSO.
Thanks

On Sun, Jul 24, 2011 at 8:53 AM, shanmugam nathan <
shanmugam.andr...@gmail.com> wrote:

> Hi Gaurav,
> Sorry i'm not sure about that platform change.
> But let me try and let you know soon.
>
> If you get any update on that please let me know
>
> Regards,
> Shanmugam
>
>
>
> On Fri, Jul 22, 2011 at 7:36 PM, gaurav gupta 
> wrote:
>
>> Hi Shanmugam,
>> thanks 4 reply. i work for that too.
>> its working fine when in my phone Facebook For Android 1.3 is used.
>> but when i upgrade my Facebook For Android to 1.5 or 1.6 , its not
>> working.
>> this issue is related to Facebook updation.
>> Please look at this issue.
>> if u find any link or anything regarding this, let me know
>> Thanks
>>
>>
>>
>>  On Sat, Jul 16, 2011 at 4:56 PM, shanmugam nathan <
>> shanmugam.andr...@gmail.com> wrote:
>>
>>> Hey gaurav,
>>>
>>> Why don't u try with EasyFacebookConnectSDK  its quite simpler for
>>> beginners.
>>> But u can find some errors in LogCat but just ignore those coz ur
>>> final target ll be achieved.
>>>
>>>
>>> Thanks,
>>> Shanmugam
>>>
>>> --
>>> 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
>>>
>>
>>  --
>> 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
>>
>
>  --
> 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
>

-- 
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: starting service from launch icon

2011-07-24 Thread Zsolt Vasvari
AFAIK, if finish() is called from onCreate(), the view is never
shown.  I've read this somewhere in the docs and I use this technique
to set a user configurable place to start my app.  It calls an
activity and if it's not the starting "screen", it navigates away from
it and finish()-es it right away.  The screen is never shown and I do
NOT have NoDisplay set.

On Jul 25, 5:22 am, Mark Murphy  wrote:
> On Sun, Jul 24, 2011 at 5:09 PM, kamiseq  wrote:
> > "I cant find any other solution then launching activity that will
> > finish immediately after starting service but this shows a blank,
> > white screen for a second so this is rather poor workaround. "
>
> > this is what I thought but it is showing white screen for a moment so
> > I dont know how to remove that
>
> http://stackoverflow.com/questions/6796118/how-to-handle-a-silent-sen...
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training in NYC:http://marakana.com/training/android/

-- 
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: popupwindow

2011-07-24 Thread Zsolt Vasvari
An interface is exactly just that (plus constant declerations).  With
abstract classes, you can have static methods and everything else that
comes with a proper class.  The drawback is, of course, that you can
only inherit from at most one abstract class.

I cannot think of even a single example, off the top of my head, where
an abstract class in Android could have also been defined as an
interface without losing any functionality.



On Jul 25, 12:05 pm, Indicator Veritatis  wrote:
> Those "many cases for this there is no particularly good reason one
> was picked over the other" are most likely, I hope, the cases where I
> gave up on trying to figure out why the Android team chose to make the
> one 'abstract class' and the other 'public interface';)
>
> On Jul 21, 10:28 pm, Dianne Hackborn  wrote:
>
>
>
> > On Thu, Jul 21, 2011 at 8:16 PM, Indicator Veritatis 
> > wrote:
>
> > > They do not pause to explain, for example ... why some classes are defined
> > > a public abstract classes, while very similar other classes are
> > > defined as interfaces.
>
> > Well hopefully you generally don't care.  And to be honest, in many cases
> > for this there is no particularly good reason one was picked over the other.
> > ;)
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
>
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see and
> > answer them.- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] java.lang.IllegalArgumentException: Unknown URL with Android 2.1

2011-07-24 Thread Sarath Krishna
Wrote the following code to insert an item into sqlite database. This
code worked fine in Android 1.6 device but I got an error in Android
2.1 device

public static final String PROVIDER_NAME = "org.books";
public static final Uri CONTENT_URI =
  Uri.parse("content://"+ PROVIDER_NAME + "/books");
private static final String DATABASE_TABLE = "titles";


public Uri insert(Uri uri, ContentValues values) {
 //---add a new book---
long rowID = booksDB.insert(
   DATABASE_TABLE, "", values);

//---if added successfully---
if (rowID>0)
{
   Uri _uri = ContentUris.withAppendedId(CONTENT_URI, rowID);
   getContext().getContentResolver().notifyChange(_uri, null);
   return _uri;
}
throw new SQLException("Failed to insert row into " + uri);
}

ContentValues values = new ContentValues();

  Uri  uri = getContentResolver().insert(
   Uri.parse(
  "content://org.books/books"),
  values);


This is the error I got when running on Android 2.1 device. Is my URL
format correct?


07-22 17:56:59.479: ERROR/AndroidRuntime(4926): Caused by:
java.lang.IllegalArgumentException: Unknown URL content://org.books/books
07-22 17:56:59.479: ERROR/AndroidRuntime(4926): at
android.content.ContentResolver.insert(ContentResolver.java:626)

-- 
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: starting service from launch icon

2011-07-24 Thread rich friedel
Did you use the activity theme android:theme="@android:style/ Theme.NoDisplay"

-- 
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] Game not functioning properly after it is recreated by Android.

2011-07-24 Thread Raghav Sood
Hi,

Yesterday I ported one of my windows games to Android. I used AndEngine. The
game functions perfectly except when it is recreated by android. For
example, you play for a while and then use the back button, open the
browser, market and a couple of other apps and then come back to the game.
The background and scoring system loads perfectly but the ball (which is
sort of the entire game in itself) doesn't load or show!!

Is there a bug with my code? Or is there a bug in AndEngine? Or both? Or
none?

The game in question is
https://market.android.com/details?id=com.raghavsood.speedball

Thanks

-- 
Raghav Sood
http://www.raghavsood.com/
http://wiki.androidappcheck.com/
http://www.telstop.tel/
https://market.android.com/developer?pub=Raghav+Sood

-- 
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: popupwindow

2011-07-24 Thread Indicator Veritatis
Those "many cases for this there is no particularly good reason one
was picked over the other" are most likely, I hope, the cases where I
gave up on trying to figure out why the Android team chose to make the
one 'abstract class' and the other 'public interface';)

On Jul 21, 10:28 pm, Dianne Hackborn  wrote:
> On Thu, Jul 21, 2011 at 8:16 PM, Indicator Veritatis wrote:
>
> > They do not pause to explain, for example ... why some classes are defined
> > a public abstract classes, while very similar other classes are
> > defined as interfaces.
>
> Well hopefully you generally don't care.  And to be honest, in many cases
> for this there is no particularly good reason one was picked over the other.
> ;)
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

-- 
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] SharedUserId: Things that Cannot Change http://android-developers.blogspot.com/2011/06/things-that-cannot-change.html

2011-07-24 Thread Greg Giacovelli
Would SharedUserId be worth calling out. I currently don't have one set on 
any of my apps, but after playing around with the feature while trying to 
get a Test Project to run as the same user ...  I think it's not really 
possible to change the user_id with a live app without some big issues. The 
only way I can think to do it is to release an apk which changes all 
elements in /data/data/* to be opened with Context.MODE_WORLD_WRITEABLE and 
then later in another apk release, change the sharedUserId to the value 
desired. This sounds pretty bad. My theory is based on just very primitive 
tests of upgrading from a debug build with no sharedUserId to a debug build 
of the same package (cert) and realizing that any attempt to read anything 
in the /data/data/ either throws a SecurityException or 
FileNotFoundException (even when writing a new file). I think this should 
really be called out in the documentation, similar to how package name has 
big bold letters around it all the time that says (DO NOT CHANGE!) :)

However even with my idea of making a release with world writable files, I 
don't believe I would ever be able to create new files within 
/data/data/. I am wondering that if the package name has to be 
unique anyways for the package manager, why they just didn't make the 
default user_id the package_name of the app. Then with the correct signing 
cert and agreed upon name you would be able to migrate to a userid if need 
be. 

... Or am I completely wrong?


-- 
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: droid x2 install from unknown sources?

2011-07-24 Thread Thomas
I uploaded another .apk to the web site and clicking on the apk link
appeared to download but it didn't install.  Looking around a bit I
found awesomedrop on Android market.  After installing it on the Droid
x2, I activated it on the Android and then went to their web site at
labs.dashwire.com .  It created a key for me to enter  into the
android app.  I then dragged the apk file that wouldn't install from
the web link to the browser window and PC/Android combo proceeded to
download and install the .apk file correctly.
The answer at least on the Droid x2 is:  you need some sort of app to
do the installing for .apks not on Android Market even if "unknown
sources" is checked.
I didn't bother with anything for the G1 as it knows how to
install .apks no matter where they are from.

Tom B

On Jul 20, 5:52 pm, Mark Murphy  wrote:
> Have you tried other APKs, besides yours?
>
>
>
>
>
>
>
>
>
> On Wed, Jul 20, 2011 at 5:26 PM, Thomas  wrote:
> > My .apk installs from Anroid Market successfully on mydroidx2.  If I
> > uninstall it and try to install it from an unknown sources (on a
> > server), the .apk appears to start downloading but nothing happens.
> > Is this unique to theX2or is there another setting somewhere besides
> > the allow Unknown Sources?
>
> > I can go through the same process with Android Developers G1 and
> > the .apks install from Market  and from the server just fine.
>
> > The .apk can be found on Android Market as (Vampire of Needham) and on
> > the server at
> >http://thomasofneedham.com/android/sourcefor those interested in
> > experimenting.
>
> > tom b
>
> > --
> > 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
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|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.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to know what internal process runs an application

2011-07-24 Thread elDoudou
Thank you Mark for taking care to answer.

I have already thought of implementing it the straightforward way you
propose, but I think that this is not satisfactory, for the reasons I
have attempted to expose in my previous post.

I'm sorry, but your answer does not answer my requirements, and as I
stated, having to insert a line of code referring a static method
every where I need to make sure my application is initialized is for a
poor design, because I have something like 100 Activity classes in my
application (yes, this is a very big application), and I cannot
prevent from forgetting to insert the piece of code somewhere. I
prefer to have an interception design pattern, so as to circumvent
that issue. I'd prefer not to have to derive from abstract classes
neither.

If someone is eager to accept my requirements and propose a solution,
or simply state that there are no solution, I'd be very grateful.

I still do not understand why the Android platform does not expose the
"android:process" information at runtime when starting up a process,
because this is something declared in the AndroidManifest.xml, and
that it may provide valuable information for developers at runtime,
event if, yes, I understood, an application process is just an
anonymous container ;) In my opinion, it should not be that anonymous
when you explicitly state a value in the manifest, and I do not expect
to get the PID, just the declared "android:process" value, because
this is not an implementation detail, this is a structural
information.

Regards,
Édouard

-- 
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 implement a Broadcast Receiver

2011-07-24 Thread lbendlin
Mark,  does this mean I could have a functionality that would start (the 
rest of) my app when the manifested receiver gets the broadcast?  In my case 
users are asking me to start my app when they connect their A2DP speakers.

-- 
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] A little help with layout params in code.

2011-07-24 Thread authorwjf
Hi All,

I am hoping someone out there can give me an idea what I am doing
wrong.  I wanted to create a table dynamically in my application,
which I did, but also I wanted to be able to set some of the layout
parameters, specifically the gravity and layout_gravity for a couple
text views and one image view.

I thought it would be pretty straight forward and tried the following
code:


  if (v.getId()==R.id.add_row) {
mRowCount++;
TableLayout table = 
(TableLayout)findViewById(R.id.the_table);
TableRow row = new TableRow(this);
TextView tv1 = new TextView(this);
TextView tv2 = new TextView(this);
ImageView iv = new ImageView(this);
tv1.setText("Table row #"+Integer.toString(mRowCount));
tv1.setGravity(Gravity.LEFT);
//The following line causes my textview to
disappear
tv1.setLayoutParams(new
LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT, Gravity.LEFT));
row.addView(tv1);
iv.setImageResource(R.drawable.divider);
//And the line after this one does the same to
my imageview
iv.setLayoutParams(new
FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT, Gravity.CENTER));
row.addView(iv);
tv2.setText("Add more text here.");
row.addView(tv2);
table.addView(row);
}

Unfortunately I've been unable to get this to work.  The problem is
that whenever I assign the layout parameters to either my text view or
my image view, that view seems to not get added to my table row, or if
it does, its not at all visible.  Does anybody out there have
experience formatting table row comments in code?  I'd sure appreciate
being pointed in the right direction.

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] WRITE_EXTERNAL_STORAGE (not set, but i write to sdcard)??

2011-07-24 Thread Mark Murphy
On Sun, Jul 24, 2011 at 4:29 PM, guruk  wrote:
> Hi there,
> i always did wrote to sd card with
>
> String baseDir =
> Environment.getExternalStorageDirectory().getAbsolutePath();
>
> String fileName = DATABASE_TABLE + ".myd";
>
> File f = new File(baseDir + File.separator + fileName);
>
> FileWriter gpxwriter = new FileWriter(f);
>
> BufferedWriter out = new BufferedWriter(gpxwriter);
>
>                 // 
>
> now i came about the permission: WRITE_EXTERNAL_STORAG
>
> I NEVER used/implemented that permission into my manifest.
>
> So what?
>
> I have android:minSdkVersion="2"
>
> and my building target is 8 android:minSdkVersion="2" (android 2.2)
>
> does it have to do with that?

Yes. You automatically get WRITE_EXTERNAL_STORAGE for old minSdkVersions.

> I am just wondering WHY can i write to sdcard without that permission.
>
> and why should i implement it?

Because someday you will increase the minSdkVersion and no longer be
able to write to external storage.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

-- 
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: starting service from launch icon

2011-07-24 Thread Mark Murphy
On Sun, Jul 24, 2011 at 5:09 PM, kamiseq  wrote:
> "I cant find any other solution then launching activity that will
> finish immediately after starting service but this shows a blank,
> white screen for a second so this is rather poor workaround. "
>
> this is what I thought but it is showing white screen for a moment so
> I dont know how to remove that

http://stackoverflow.com/questions/6796118/how-to-handle-a-silent-send-intent-with-a-headless-activity

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

-- 
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] Compiling an app with JAR files or else ...

2011-07-24 Thread Mark Murphy
On Sun, Jul 24, 2011 at 5:14 PM, Emre A. Yavuz  wrote:
> We have an application which runs as an Android Service in the background.
> Let's assume that we would like to have another application (an activity
> rather than a service this time) which is supposed to bind to this service
> (assuming that the service is already up and running when this application
> is started). The binding is provided through callback functions (as if the
> service provides an API for any application that wants to bind to it).
>
> When someone needs to compile an application of this sort, they either need
> to have the source code or the JAR files of the service.

No. They just need to have the AIDL file.

> We would like to
> keep the source code to ourselves so I was wondering what the most
> convenient way is to distribute the code for the service for anyone to
> compile their applications that bind to it.

Just distribute the AIDL file.

> Is there any way to compile an app using
> an apk of another (the service application in this case) in Eclipse ?

No.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

-- 
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] Compiling an app with JAR files or else ...

2011-07-24 Thread Emre A. Yavuz




Hi,

 

We have an application which runs as an Android Service in the background. 
Let's assume that we would like to have another application (an activity rather 
than a service this time) which is supposed to bind to this service (assuming 
that the service is already up and running when this application is started). 
The binding is provided through callback functions (as if the service provides 
an API for any application that wants to bind to it).

When someone needs to compile an application of this sort, they either need to 
have the source code or the JAR files of the service. We would like to keep the 
source code to ourselves so I was wondering what the most convenient way is to 
distribute the code for the service for anyone to compile their applications 
that bind to it. JAR files are reversible as far as I know so that wouldn't do 
it. Is there any way to compile an app using an apk of another (the service 
application in this case) in Eclipse ?

Let me know if there is a more suitable list to post this question if you think 
this is not the right one. Thanks in advance for your comments.

Emre

 

 
  

-- 
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: starting service from launch icon

2011-07-24 Thread kamiseq
"I cant find any other solution then launching activity that will
finish immediately after starting service but this shows a blank,
white screen for a second so this is rather poor workaround. "

this is what I thought but it is showing white screen for a moment so
I dont know how to remove that

On 24 Lip, 20:57, rich friedel  wrote:
> Off the top of my head, you could launch an "invisible" Activity then in 
> onCreate() start the Service then call finish() on the Activity

-- 
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] CountDownTimer too slow ???

2011-07-24 Thread Nick Risaro
The calls to *onTick* are synchronized, maybe your code is taking more than
a second to execute. Log can be expensive, and with debug symbols enabled
your code will run a little bit slower than in real life.

Or maybe the end of times is close!! :P

On Sun, Jul 24, 2011 at 2:30 PM, Christophe <
christophe.lebesner...@gmail.com> wrote:

> Run the following code in the emulator and start a chronometer at the
> same time :
>
> // log some text each second :
> CountDownTimer countDown = new CountDownTimer(Integer.MAX_VALUE, 1000)
> {
>private int i = 0;
>@Override
>public void onTick(long millisUntilFinished) {
>Log.i("", "###" + i);
>i++;
>}
>@Override
>public void onFinish() {}
> };
>
> countDown.start();
>
> Then wait a few minutes.
> For example I stop when my chronometer was at 7min44s. The value in
> the log was 448seconds => 7min28s.
>
> WTF ?!???
>
> --
> 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

-- 
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] WRITE_EXTERNAL_STORAGE (not set, but i write to sdcard)??

2011-07-24 Thread guruk
Hi there,
i always did wrote to sd card with

String baseDir = 
Environment.getExternalStorageDirectory().getAbsolutePath();

String fileName = DATABASE_TABLE + ".myd";

File f = new File(baseDir + File.separator + fileName);

FileWriter gpxwriter = new FileWriter(f);

BufferedWriter out = new BufferedWriter(gpxwriter);

// 

now i came about the permission: WRITE_EXTERNAL_STORAG

I NEVER used/implemented that permission into my manifest.

So what?


I have android:minSdkVersion="2"

and my building target is 8 android:minSdkVersion="2" (android 2.2)

does it have to do with that?


I am just wondering WHY can i write to sdcard without that permission.

and why should i implement it?


thx

chris


-- 
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: Default.png

2011-07-24 Thread Romain Guy
Yes and no. The framework will take care of it for you with software
rendering but if you can easily remove it, it's better.

On Sun, Jul 24, 2011 at 7:08 AM, Adam Ratana  wrote:

> On Jul 23, 8:41 pm, Romain Guy  wrote:
> > You can do something similar by setting a window background in your
> theme.
> > Seehttp://
> android-developers.blogspot.com/2009/03/window-backgrounds-ui-...
> > more info
> >
> > On Sat, Jul 23, 2011 at 5:30 PM, bob  wrote:
> > > Is there anything like Default.png for Android?
>
> Romain is the part about disabling the background still relevant today?
>
> --
> 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
>



-- 
Romain Guy
Android framework engineer
romain...@android.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.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Listbox with ImageView and heapspace

2011-07-24 Thread Simon Platten

Thank you, I will give it a try.

On 24/07/2011 8:16 PM, Streets Of Boston wrote:

Purge the queue that is filled by your background process.

List item views (and imageviews within your list item views) are 
recycled. Remember for which list-item (or image-view) the 
background-thread is loading a bitmap (you'll know this in the 
adapter's getView method). Later, as soon as the same image-view is 
re-used for another bitmap, look-up the loading of the bitmap that was 
previously to be assigned to the image-view and remove this bitmap 
from the cache. For good measure, call 'recycle()' on it. Then start 
load the new bitmap for the recycled image-view.


Instead of immediately purging unused bitmap, you may want to hold on 
to them a little longer so that your background doesn't need to 
re-load the same image over and over again. However, this will 
increase the size of your queue. You'll have to put a limit on the 
queue (never more than 'x' bitmaps in the queue).


Also be sure to load bitmaps that are at most slightly larger than 
your image-view (BitmapFactory.Options.inSampleSize > 1). Don't load 
full-sized bitmap if it's not absolutely necessary.

--
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 


--
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: Listbox with ImageView and heapspace

2011-07-24 Thread Streets Of Boston
Purge the queue that is filled by your background process.

List item views (and imageviews within your list item views) are recycled. 
Remember for which list-item (or image-view) the background-thread is 
loading a bitmap (you'll know this in the adapter's getView method). Later, 
as soon as the same image-view is re-used for another bitmap, look-up the 
loading of the bitmap that was previously to be assigned to the image-view 
and remove this bitmap from the cache. For good measure, call 'recycle()' on 
it. Then start load the new bitmap for the recycled image-view.

Instead of immediately purging unused bitmap, you may want to hold on to 
them a little longer so that your background doesn't need to re-load the 
same image over and over again. However, this will increase the size of your 
queue. You'll have to put a limit on the queue (never more than 'x' bitmaps 
in the queue).

Also be sure to load bitmaps that are at most slightly larger than your 
image-view (BitmapFactory.Options.inSampleSize > 1). Don't load full-sized 
bitmap if it's not absolutely necessary.

-- 
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] starting service from launch icon

2011-07-24 Thread rich friedel
Off the top of my head, you could launch an "invisible" Activity then in 
onCreate() start the Service then call finish() on the Activity

-- 
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] starting service from launch icon

2011-07-24 Thread kamiseq
hi,
Im working on API 7 and I need to launch service without showing any
activity, my service will add status bar notification so user can
interact with application later.

I cant find any other solution then launching activity that will
finish immediately after starting service but this shows a blank,
white screen for a second so this is rather poor workaround.

I tried using broadcast receiver but this cannot be launched by




I got error ERROR/Launcher(105): Launcher does not have the permission
to launch Intent
{ act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x1020
cmp=myapp.launcher/.SettingsActivity bnds=[83,238][157,317] }.
Make sure to create a MAIN intent-filter for the corresponding
activity or use the exported attribute for this activity.

I know there are apps out there which are doing that (or at least
looks like that) so there must be a way, thanks 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] CountDownTimer too slow ???

2011-07-24 Thread Christophe
Run the following code in the emulator and start a chronometer at the
same time :

// log some text each second :
CountDownTimer countDown = new CountDownTimer(Integer.MAX_VALUE, 1000)
{
private int i = 0;
@Override
public void onTick(long millisUntilFinished) {
Log.i("", "###" + i);
i++;
}
@Override
public void onFinish() {}
};

countDown.start();

Then wait a few minutes.
For example I stop when my chronometer was at 7min44s. The value in
the log was 448seconds => 7min28s.

WTF ?!???

-- 
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 set the color of listView unused area in 2.3.3

2011-07-24 Thread dipu
How to set the color of listView unused area. in 2.3.3.  I have my
list view with layout_height as match_parent. I want listView to fill
the entire height so that I can have the same color, event listeners
etc.
This was never a problem until 2.3.3 version, (Motorola Droid3, Droid
X). Now the empty area at the bottom of the listview gets a default
gray / white color that I cannot change.

Thanks,
Dipu

-- 
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 know what internal process runs an application

2011-07-24 Thread Mark Murphy
On Sun, Jul 24, 2011 at 1:06 PM, elDoudou  wrote:
> As far as I understand, when an application process starts, its
> "Application.onCreate()" method is invoked, right? Since I do not want
> to check that my application process is properly initialized in all my
> Activities, BroadcastReceivers, IntentServices, Services,
> ContentProviders..., I decided to initialize some variables during
> that "Application.onCreate()" method.

As Ms. Hackborn has pointed out on many different occasions, you can
just as easily accomplish this via a static data member, either
initialized on first access or initialized when the class containing
said static data member is referred to.

> However, one of my application component, an IntentService, needs to
> run in another process (this is a constraint that I cannot bypass):
> this is the exception to my rule, i.e., it does not need the
> initialization to be run, and moreover it should not.

Move the code out of a custom Application class and into a static data
member. Do not refer to the class containing said static data members
from your IntentService, and they will not be initialized.

For example, you could simply make your custom Application class no
longer extend Application, rig it up to follow a standard Java
singleton pattern, and not refer to it from the IntentService (or
anywhere else that does not need it). When one of your other
components needs this stuff, they will refer to the class, causing it
to be loaded and go through your 10ms initialization logic.

> How can I do so
> that the initialization check in my "Application.onCreate()" method be
> not invoked in that special case, please?

You don't, as Ms. Hackborn pointed out previously on this thread.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

-- 
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 know what internal process runs an application

2011-07-24 Thread elDoudou
Thank you a lot Dianne and Rich for helping: I think that this
discussion will be helpful to many other Android developers ;)

I understand that I was not successful in explaining the core issue.
Let me attempt to rephrase it in a more appropriate way.

As far as I understand, when an application process starts, its
"Application.onCreate()" method is invoked, right? Since I do not want
to check that my application process is properly initialized in all my
Activities, BroadcastReceivers, IntentServices, Services,
ContentProviders..., I decided to initialize some variables during
that "Application.onCreate()" method. Since the application process
can be killed any time by the OS while it was running an Android Task,
it may happen that when the end-user presses its launch icon, or
access to it via the "latest task" feature (long-pressing the "home"
button), the lastly stacked Activity on the Task stack may be the
first application Activity to be recreated, and I would like to
prevent from having to check the initialization in all
"Activity.onCreate()" methods, for instance (even if it is just one
line of code to invoke a static method, because, for me it's a bad
design, since I may forget to insert that line of code in all
Activities). You may say that I should derive from a common Activity
which would check for the initialization: once again, I do not like
this solution, because I have various natures of Activities, like a
MapActivity, a ListActivity, a GroupActivity, a PreferenceActivity,
and I'd prefer not introduce a basis class for each Activity nature.

This discussion also applies to the BroadcastReceivers,
IntentServices, Services, and ContentProviders: I do not want to check
for the initialization nor derive from abstract class which would do
the work.

I prefer the concept of interception, and I prefer to have a
centralized place where I know that all my applications components
will go through, in order to check for the initialization. That is why
I overload the "Application.onCreate()" method, because it meets all
my requirements (except for the ContentProvider that may be invoked
before the "Application.onCreate()" method has finished its
execution), and that I know that this initialization checking and
execution just takes less than 10 ms.

However, one of my application component, an IntentService, needs to
run in another process (this is a constraint that I cannot bypass):
this is the exception to my rule, i.e., it does not need the
initialization to be run, and moreover it should not. How can I do so
that the initialization check in my "Application.onCreate()" method be
not invoked in that special case, please?

I hope that my question is now clearer. Thank you for reading, and
hopefully for proposing a solution.

Regards,
Édouard

-- 
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] invisible button

2011-07-24 Thread Mark Murphy
Use a transparent View. Any widget can detect clicks, so you may as
well go with the lightest-weight one out there.

On Sun, Jul 24, 2011 at 12:20 PM, bob  wrote:
> What's the best way to make a 100% invisible button that can listen
> for clicks?
>
> The background already contains the button image, so that's why I want
> to do this.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2

-- 
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] invisible button

2011-07-24 Thread bob
What's the best way to make a 100% invisible button that can listen
for clicks?

The background already contains the button image, so that's why I want
to do this.

-- 
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] Project Ideas

2011-07-24 Thread Kristopher Micinski
On Sun, Jul 24, 2011 at 8:03 AM, saurabh kulkarni
wrote:

> Hi everyone.I want do final year big project in android.I have done
> some small apps in android.So now I want to do some smart and
> comparitively big final year project.So does anybody has ideas please
> share.
> Thanx in advance..
>
>
Final year project, like for school?  Finding a project that people you know
will get use out of will make it a lot easier to get some motivation.  One
popular idea I had was to make a fully functional app that works with your
school's library.  During the capstone class at our university one of the
projects this year was a spectrum analyzer that worked over Bluetooth and
did the processing on the device.  These are both two examples of big
projects that can consume a term or so.

Kris

-- 
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: Why two fragments instead of one?

2011-07-24 Thread nadam
> Of course, you could just use a List*View* as well (e.g through an
> , but that is just re-using the view, not any extra code supporting
> it.
I finally got around to testing this using . Works great. The
"extra code supporting it" will end up in ActivityA both for single
and dual layout, so no problem with reusing either.

On 22 Juni, 14:16, Streets Of Boston  wrote:
> Yes, the compatibility package is open source. When you get it, you get full
> sources as well:
> \android-compatibility\v4\src
>
> About ListActivity vs ListFragment.
> In my opinion, Fragments are all about re-use. It is fairly easy to dropt a
> Fragment into any activity and it will save you from re-coding it for each
> activity. Dropping in sub-activities (e.g. a ListActivity) into a main
> activity is not impossible, but hard to manage.
>
> Of course, you could just use a List*View* as well (e.g through an
> , but that is just re-using the view, not any extra code supporting
> it.

-- 
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: Default.png

2011-07-24 Thread Adam Ratana
On Jul 23, 8:41 pm, Romain Guy  wrote:
> You can do something similar by setting a window background in your theme.
> Seehttp://android-developers.blogspot.com/2009/03/window-backgrounds-ui-...
> more info
>
> On Sat, Jul 23, 2011 at 5:30 PM, bob  wrote:
> > Is there anything like Default.png for Android?

Romain is the part about disabling the background still relevant today?

-- 
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] Project Ideas

2011-07-24 Thread νιяιη¢нソ
i am a 3rd year guy...n stuck with d same issue as saurabh brobut the
app we create should be something useful for d users n d idea on it should
be a bit innovativeplease help me out...  thanx in
advance




with regards,

virinchy

-- 
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] Project Ideas

2011-07-24 Thread rambabu mareedu
u can do big projectsbut these big projects mostly uses web
servicesbetter u can do restaurant type of applications.or else
which type of applications u want to do tell me...and which concepts u want
to cover in android...

On Sun, Jul 24, 2011 at 6:03 AM, saurabh kulkarni
wrote:

> Hi everyone.I want do final year big project in android.I have done
> some small apps in android.So now I want to do some smart and
> comparitively big final year project.So does anybody has ideas please
> share.
> Thanx in advance..
>
> --
> 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

-- 
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] Project Ideas

2011-07-24 Thread saurabh kulkarni
Hi everyone.I want do final year big project in android.I have done
some small apps in android.So now I want to do some smart and
comparitively big final year project.So does anybody has ideas please
share.
Thanx in advance..

-- 
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: starting Activity in tabbed UI from onTabChangedListener()

2011-07-24 Thread Marcin Orlowski
>
> See what mLocalActivityManager.startActivity() returns. You have to
> attach returned Window (or its root View) to your tab
>

Thanks. That's was what I missed. For reference (lamest approach):

final Window window = mLocalActivityManager.startActivity(tag, intent);
mTabContent.removeAllViews();
mTabContent.addView( window.getDecorView() );

-- 
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: glReadPixels()

2011-07-24 Thread David Liebman
As it turns out I do have to be concerned with the y values in
glReadPixels. It was a major stumbling block. They do start at the
bottom of the screen. I used a combination of techniques to get the y
value I needed. I used 'getRawY()' from the MotionEvent and another
method of the view I was in called 'getLocationInWindow()' which
reports the location in the parent window of the current window. I
also used 'getHeight()' on the view also. My code looks something like
this:

int [] locationXY = new int[2];
button_view.getLocationInWindow(locationXY);
int mBot = button_view.getHeight();
int newYValue = ( mBot + locationXY[1] ) - event.getRawY;

The value 'newYValue' is fed to the glReadPixels routine. This works
for me because my layout is very simple. I also found the link below
helpful:

http://www.anddev.org/android-2d-3d-graphics-opengl-tutorials-f2/object-polygon-face-selection-aka-picking-t11572.html

On Jul 23, 9:31 am, David Liebman  wrote:
> Hi,
>
> I'm trying to detect the opengl object under the cursor... I have read
> it referred to as picking. Here is my code:
>
>     public int makeBuffer(GL10 gl, int x, int y) {
>
>         ByteBuffer PixelBuffer = ByteBuffer.allocateDirect(4);
>         PixelBuffer.order(ByteOrder.nativeOrder());
>         PixelBuffer.position(0);
>         int mTemp = 0;
>         gl.glReadPixels((int)x, (int) y, 1, 1, GL10.GL_RGBA,
> GL10.GL_UNSIGNED_BYTE, PixelBuffer);
>         Log.e("Picking", " xy: x" + x + " y"+ y);
>         byte b [] = new byte[4];
>         PixelBuffer.get(b);
>         Log.e("Picking", " rgba: r"+ PixelBuffer.get(0) + " g" +
> PixelBuffer.get(1) + " b" +
>                 PixelBuffer.get(2) + " a" + PixelBuffer.get(3));
>         Log.e("Picking", " rgba: r"+ b[0] + " g" + b[1] + " b" +
>                 b[2] + " a" + b[3]);
>
>         //mTemp = PixelBuffer.get(0);
>         mTemp = b[0];
>
>         Log.e("Picking", "result:" + mTemp );
>
>         return mTemp;
>     }
>
> See that most of the code above is logcat statements. My code prints
> zeros to the screen for r,g, and b. For alpha it prints '-1' which is
> translatable to 255 (unsigned) as 'full alpha'. I'm trying to detect a
> color on the screen at the given x/y position. I would be happy with a
> red value that's somewhere between 1 and 15, as that's the color that
> should be below the touch. I would expect that if I was doing it
> entirely wrong I would get all zeroes, but I must be doing it at least
> partially right, as I'm getting alpha. I have also included lines in
> my manifest that tell the phone that I use the permissions for the
> 'surface flinger' and the 'read frame buffer'. I don't know if these
> lines are working.
>
>  android:name="android.permission.ACCESS_SURFACE_FLINGER" />
> 
>
>
> any help would be appreciated.

-- 
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: Problem with Notification Service and Progress bar

2011-07-24 Thread Kromosome
Check this resource

http://developer.android.com/resources/articles/faster-screen-orientation-change.html

-- 
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: Updating home screen shortcut icon

2011-07-24 Thread William Ferguson
No, just the icon.

On Jul 24, 7:29 pm, Zsolt Vasvari  wrote:
> Did you also change your main activity? Doing that can cause the icon
> not to update until the next reboot.
>
> On Jul 24, 2:23 pm, William Ferguson 
> wrote:
>
>
>
>
>
>
>
> > The latest version of my app has a new launcher icon, and when the new
> > version is installed (at least on the emulators and a 2.3.3 device)
> > the icon for existing home screen shortcuts to the app are not
> > updated.
>
> > Is there a way to force existing home screen shortcuts to update their
> > icons?
>
> > William

-- 
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] 3D maps

2011-07-24 Thread lbendlin
1. no
2. N/A
3. highly unlikely as it would mean switching from raster maps to vector 
maps
4. no

-- 
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: starting Activity in tabbed UI from onTabChangedListener()

2011-07-24 Thread skink


On Jul 24, 11:13 am, Marcin Orlowski  wrote:
> Hi
>
> I got tabbed UI, where I use own tab layout by utilising
> TabSpecs.setContent() to provide custom layout. As I wanted tab content to
> be Activites not Views, I set onTabChangedListener() to do the job, with no
> much success:
>
> public class MainActivity extends TabActivity {
>  onCreate() {
>
>         mTabHost = (TabHost)findViewById(android.R.id.tabhost);
>         mLocalActivityManager = getLocalActivityManager();
>         mTabHost.setup(mLocalActivityManager);
>
> }
> }
>
> and listener:
>
> public void onTabChanged(String tag) {
> intent = new Intent().setClass( context, NextActivity.class);
> mLocalActivityManager.startActivity(tag, intent);
>
> }
>
> Listener's onTabChanged() is called, but nothing else happens, nor crashes,
> nor logs. Hints?
>
> PS: I also failed to follow reasoning why seting intent (so the content tabs
> points to) equals setting view of tab itself (it all falls under
> ContentStrategy in TabHost).
> PPS: Fragments, I know, I know.

See what mLocalActivityManager.startActivity() returns. You have to
attach returned Window (or its root View) to your tab

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.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Offering free and paid APKs on the Market

2011-07-24 Thread Davy
Hi,

I'm thinking about offering a free / paid version of my app on the Market. I 
currently only have a paid application on the market (let's assume the 
current version on the market is called com.myapp).
The idea would be to strip off some of the functionality in the free 
version. I'm thinking about the following approach :

Starting from my current (and only) Eclipse project called com.myapp (using 
package com.myapp), I would :

Move most of functionality into a new library project, using a new package 
com.myapp.common. This project would include most the current classes from 
my project.
A lot of activities / broadcastreceivers / services would become abstract in 
the com.myapp.common project.
Some redesign/refactoring would be in order so that the free/paid version 
can extend from these abstract classes to drive the logic correctly (free vs 
paid).
Introduce a MyAppPro (using package com.myapp - to keep it aligned with the 
current version in the market)
Introduce a MyAppLite (using package com.myapp.lite)

I did a small POC and this approach seems to work to a certain degree. I can 
subclass where needed to provide additional functionality, and can also 
override certain layouts where needed.

However, I was wondering if there were some good scenarios to cover the 
following :

I use intents a lot to do both internal communication in my app, and 
exposing functionality to the outside world. If I have both a free and paid 
version of the app, how do I avoid that these 2 start to interfere.
I have widgets in both the free and paid version. Free version widgets are a 
subset of the paid version. If a user has both the free and paid version 
installed, how do I avoid that the users sees duplicate widgets?
I register a lot of broadcast-receivers. Again duplicates will come into the 
picture here. Do I need to ensure that in my free / paid version, the intent 
filters are properly "name-spaced" that they don't interfere with each 
other, to avoid that both the free and paid version starts picking up 
certain intents ?
I register a lot of activities with an intent-filter (used for "share/send" 
functionality). How do I avoid mixing both the free / paid version.

Is there a way to detect that a users has both the free app / paid app 
installed, and in that case, somehow deactivate the free version ? Are there 
any design patterns / out-of-the-box solutions for that ? Also, any pointers 
to existing resources would be great.

Another approach that was thinking off was to just make the current version 
free, and use in-app-billing to turn it into a fully functional paid 
version. 
However, that would be difficult as I think there is no way to automatically 
convert my existing paid user-base. These would then all of a sudden get a 
free version with limited functionality when they update the app, and would 
have to go through the in-app-billing process (paying twice) to get the full 
functionality.

Regards,
Davy

-- 
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: starting Activity in tabbed UI from onTabChangedListener()

2011-07-24 Thread Marcin Orlowski
Thanks. This is temporary approach which I am going to rewrite for fragments
later, but as for now, sucks or not, it have to be that way., hence my
question (despite of knowing what "deprecated" means ;)

-- 
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: Updating home screen shortcut icon

2011-07-24 Thread Zsolt Vasvari
Did you also change your main activity? Doing that can cause the icon
not to update until the next reboot.

On Jul 24, 2:23 pm, William Ferguson 
wrote:
> The latest version of my app has a new launcher icon, and when the new
> version is installed (at least on the emulators and a 2.3.3 device)
> the icon for existing home screen shortcuts to the app are not
> updated.
>
> Is there a way to force existing home screen shortcuts to update their
> icons?
>
> William

-- 
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: starting Activity in tabbed UI from onTabChangedListener()

2011-07-24 Thread Zsolt Vasvari
Please don't use Activities as tab panes.  You are just setting
yourself up for all kinds of grief now and in the future.  And since
this is deprecated,  you will never see the many outstanding bugs
fixed.

 If you must, refactor your code so that you can just use a View.  I
know that can be painful, I've done it, but you are doing yourself a
favor, trust me.

On Jul 24, 5:13 pm, Marcin Orlowski  wrote:
> Hi
>
> I got tabbed UI, where I use own tab layout by utilising
> TabSpecs.setContent() to provide custom layout. As I wanted tab content to
> be Activites not Views, I set onTabChangedListener() to do the job, with no
> much success:
>
> public class MainActivity extends TabActivity {
>  onCreate() {
>
>         mTabHost = (TabHost)findViewById(android.R.id.tabhost);
>         mLocalActivityManager = getLocalActivityManager();
>         mTabHost.setup(mLocalActivityManager);
>
> }
> }
>
> and listener:
>
> public void onTabChanged(String tag) {
> intent = new Intent().setClass( context, NextActivity.class);
> mLocalActivityManager.startActivity(tag, intent);
>
> }
>
> Listener's onTabChanged() is called, but nothing else happens, nor crashes,
> nor logs. Hints?
>
> PS: I also failed to follow reasoning why seting intent (so the content tabs
> points to) equals setting view of tab itself (it all falls under
> ContentStrategy in TabHost).
> PPS: Fragments, I know, I 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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Curious NPE

2011-07-24 Thread Zsolt Vasvari
Is onBackPressed called from a different thread perhaps? I wouldn't
have thought so, but stranger things have happened.   And if that's
the case, how can I ensure that my variable is initialized.  I cannot
construct it on the decleration as the object depends on the intent
passed in to the Activity.

My Activity can take a couple of seconds to display,  and if I press
the back button quickly one of two things happen on my Nexus One: it
either doesn't register at all or that the activity flickers on and
off and I am back to the original Activity.  In no case did it crash
in my testing.

But as I said, I got some other errors like this for a member that
should have been initialized in onResume.

On Jul 24, 4:33 pm, Doug  wrote:
> Sounds like it might be possible that onBackPressed can get called
> before onCreate in some circumstances where the device is being slow?
>
> If that is at all a possibility, maybe you should check for null in
> onBackPressed!  :-)
>
> Doug
>
> On Jul 23, 4:00 pm, Zsolt Vasvari  wrote:
>
>
>
>
>
>
>
> > I am getting some bugreports of NPE's which I cannot explain.
>
> > These happen rarely.  Here's the must baffling (in simplified code):
>
> > class MyActivity extends Activity
> > {
> >    Object myObject;
>
> >     protected void onCreate(Bundle state)
> >    {
> >            myObject = new Object();
> >     }
>
> >     public void onBackPressed()
> >     {
> >            myObject.myMethod();
> >     }
>
> > }
>
> > Then the user gets a NPE on myObject when it tries to call myMethod in
> > obBackPressed()
>
> > There are no other myObject assignemnet in my code -- once it's
> > inialized, it's never touched.  So the only way I can see that NPE
> > happenining is if onBackPressed() is called before onCreate().
>
> > I've had some other reports where the NPE happened after a screen
> > rotate, but it involved a member variable, which should have been also
> > initalized in onCreate().
>
> > Since these reports are rare with only 1 report per error, I suspect a
> > race conditiion.
>
> > Would love to hear people's ideas. (And please don't tell me to chech
> > myObject != null before accessing)

-- 
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] starting Activity in tabbed UI from onTabChangedListener()

2011-07-24 Thread Marcin Orlowski
Hi

I got tabbed UI, where I use own tab layout by utilising
TabSpecs.setContent() to provide custom layout. As I wanted tab content to
be Activites not Views, I set onTabChangedListener() to do the job, with no
much success:

public class MainActivity extends TabActivity {
 onCreate() {

mTabHost = (TabHost)findViewById(android.R.id.tabhost);
mLocalActivityManager = getLocalActivityManager();
mTabHost.setup(mLocalActivityManager);
}
}

and listener:

public void onTabChanged(String tag) {
intent = new Intent().setClass( context, NextActivity.class);
mLocalActivityManager.startActivity(tag, intent);
}

Listener's onTabChanged() is called, but nothing else happens, nor crashes,
nor logs. Hints?

PS: I also failed to follow reasoning why seting intent (so the content tabs
points to) equals setting view of tab itself (it all falls under
ContentStrategy in TabHost).
PPS: Fragments, I know, I 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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Menu guidelines

2011-07-24 Thread Abhishek Akhani
make one class BaseActivity extending Activity class and then override the 
OnCreateOptionMenu() method and write your common menu code there... then 
extend all your activities with this BaseActivity class I think this 
will work for you...

-- 
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: Application doesn't close with back button

2011-07-24 Thread Abhishek Akhani
you can also do it by changing android:noHistory = "true" in menifest
file for your first two screens...

On Jul 23, 6:22 pm, Zwiebel  wrote:
> I made an application, with two logo activity at the start, first is
> my logo, and the second is the application's logo, they are stay for 2
> seconds, and then the next activity starts, the Menu. I can't close my
> application because from the menu if I press the back button, it's
> only show the application's logo, and doesn't exit to the main screen.
> I tried to import the finish(); method to my logo screens, but it
> doesn't works either. With my another application, there weren't any
> problem. What's the matter, what do you think?

-- 
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: Spinner box

2011-07-24 Thread Abhishek Akhani
Its possible n for this you have to make a custom adapter (extending
BaseAdapter) and an xml file for this view. and set this custom
adapter as your spinner's adapter.

On Jul 24, 12:11 pm, Goutom  wrote:
> Hi
>
> Please open the image.In the image  "Font Size" is header and "Standard" is
> item.Header "Font Size" will always will be in the spinner but not in the
> item list.Item list just shows items.
> Is this possible to build this kind of spinner? if possible please guide me.
>
> thanks in advance.
>
> Regards
> Goutom
>
>  spinneritem.png
> 3KViewDownload

-- 
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: Curious NPE

2011-07-24 Thread Doug
Sounds like it might be possible that onBackPressed can get called
before onCreate in some circumstances where the device is being slow?

If that is at all a possibility, maybe you should check for null in
onBackPressed!  :-)

Doug

On Jul 23, 4:00 pm, Zsolt Vasvari  wrote:
> I am getting some bugreports of NPE's which I cannot explain.
>
> These happen rarely.  Here's the must baffling (in simplified code):
>
> class MyActivity extends Activity
> {
>    Object myObject;
>
>     protected void onCreate(Bundle state)
>    {
>            myObject = new Object();
>     }
>
>     public void onBackPressed()
>     {
>            myObject.myMethod();
>     }
>
> }
>
> Then the user gets a NPE on myObject when it tries to call myMethod in
> obBackPressed()
>
> There are no other myObject assignemnet in my code -- once it's
> inialized, it's never touched.  So the only way I can see that NPE
> happenining is if onBackPressed() is called before onCreate().
>
> I've had some other reports where the NPE happened after a screen
> rotate, but it involved a member variable, which should have been also
> initalized in onCreate().
>
> Since these reports are rare with only 1 report per error, I suspect a
> race conditiion.
>
> Would love to hear people's ideas. (And please don't tell me to chech
> myObject != null before accessing)

-- 
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: navigation dots

2011-07-24 Thread Harry
Lots of ways can do so.
you can use algorithms  OR
when you change the color of dots, there must be some action going
with it, such as swipe or slide.
change the dot images when an action happens.

On Jul 24, 2:25 pm, vani reddy  wrote:
> Hi,,
> But how to make this work at runtime??
>
> On Wed, Jul 20, 2011 at 6:51 PM, Mark Murphy wrote:
>
>
>
>
>
> > Use an ImageView for your dots. Use different images with different
> > dots as needed.
>
> > On Wed, Jul 20, 2011 at 7:43 AM, vani reddy 
> > wrote:
> > > Hi friends,
> > > How to implement iphone like navigation of images by showing dots below
> > in
> > > android.
> > > I referred the below link,but did not get much idea
>
> >http://stackoverflow.com/questions/6014781/iphone-like-navigation-dot...
> > > Please reply..
>
> > > --
> > > Regards,
> > > Vani Reddy
>
> > > --
> > > 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
>
> > --
> > Mark Murphy (a Commons Guy)
> >http://commonsware.com|http://github.com/commonsguy
> >http://commonsware.com/blog|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.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Regards,
> Vani Reddy

-- 
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: Request to Google's Android SDK team

2011-07-24 Thread Yahel
> If my users were inconvenienced, I would try to give
> them a temporary solution to hold them over until I have a good solution.
>  But that's just me.  It's a difference in engineering philosophy.

Your innocence is touching :D

Google doesn't have users, it has beta-testers.
I know it's going to hurt the engineer in you but Google expects you
to work the way they do : Launch bêta-4 crashes out of 5 launch-no
graphic design-not usability-tested app and simply add a way to
monitor the crashes and beta-testers(users:) feedback.

It worked well for them. But to be fair they just copied Microsoft
recipe :D

Beside, you have 600 000 new potential customer every day, so if the
600 000 of today are upset, well you'll do better tomorrow :D It's
called the Google Way :D

Yahel.

-- 
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] Listbox with ImageView and heapspace

2011-07-24 Thread Simon Platten
I have a listbox which has an imageview in every item, the bitmaps for the
images are loaded in the background as the user brings the items into view.
The images are queued for loading in the background as the user scrolls
through the list items.

If I have a large list and I take my time scrolling through them, everything
works great, however if I race through the list to the end, it will always
crash at some point as it runs out of heap space.

My guess is that so many bitmaps are in the queue and the resource allocated
for each is not being re-cycled fast enough.  I am not sure how I can
improve this such that the resources are free'd as soon as they are no
longer required.

-- 
Regards,
Sy

-- 
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] Spinner box

2011-07-24 Thread Goutom
Hi

Please open the image.In the image  "Font Size" is header and "Standard" is
item.Header "Font Size" will always will be in the spinner but not in the
item list.Item list just shows items.
Is this possible to build this kind of spinner? if possible please guide me.

thanks in advance.

Regards
Goutom

-- 
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] Add xml layout in another view

2011-07-24 Thread Goutom
Hi Kostya,
Thanks.Ur advice helped me.
Regards
Goutom

On Thu, Jul 14, 2011 at 1:57 PM, Kostya Vasilyev  wrote:

> You can't add the same view to a layout multiple times.
>
> So rather than doing this:
>
> 15.07.2011 0:52, Goutom пишет:
>
>  View view = layoutInflater.inflate(R.**layout.listitem,null);
>> for (int i = 0; i < 5; i++) {
>> linearlayout.addView(view);
>> }
>>
>
> Do this:
>
>
> for (int i = 0; i < 5; i++) {
> View view = layoutInflater.inflate(R.**layout.listitem,null);
> linearlayout.addView(view);
> }
>
> --
> Kostya Vasilyev
>
> --
> 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

-- 
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