[android-developers] Re: Google Analytics Hits not delivered

2016-10-12 Thread Emanuele Albero
Hi Chirag, 

i'm facing the same issue.
have you solved it? Can you give me a hint?

Emanuele

Il giorno giovedì 14 luglio 2016 10:19:01 UTC+2, Chirag Manwani ha scritto:
>
> I have been trying to implement Google Analytics in my app by following 
> the steps on the official documentation by Google. After completing the 
> coding part, I moved on to the analytics console to see if I received any 
> hits. I waited for almost 2 days but did not see any progress. I then tried 
> to debug the problem by using GAv4 tag in my logcat. I got the following 
> log,
> 07-14 05:47:28.290 23456-23483/"Package Name" D/GAv4: Hit delivery 
> requested: ht=1468482448231, _s=6, _v=ma9.0.80, a=321943822, aid="Package 
> Name", an="AppName", av=1.4, cd=Login, 
> cid=139d8ee3-8cd7-4979-b41c-8f36af1e3e0c, sf=100.0, sr=720x1280, 
> t=screenview, tid=UA-9576-2, ul=en-us, v=1
> 07-14 05:47:28.352 23456-23483/"Package Name" D/GAv4: Hit sent to the 
> device AnalyticsService for delivery
> 07-14 05:49:31.654 23456-23483/"Package Name" D/GAv4: Hit delivery 
> requested: ht=1468482571630, _s=7, _v=ma9.0.80, a=321943823, aid="Package 
> Name", an="AppName", av=1.4, cd=Dashboard, 
> cid=139d8ee3-8cd7-4979-b41c-8f36af1e3e0c, sf=100.0, sr=720x1280, 
> t=screenview, tid=UA-9576-2, ul=en-us, v=1
> 07-14 05:49:31.752 23456-23483/"Package Name" D/GAv4: Hit sent to the 
> device AnalyticsService for delivery
>
> I am guessing if the hit is sent to the analytics service then the code is 
> correct, but I am not able to see any progress in the analytics console. 
> These two hits are for two different activities in my app. Can anyone help 
> me out on how to further debug this issue, or suggest how to solve this 
> problem? All views are welcome.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/810eaaea-bfe5-4319-8607-c8a6ae36857b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: AsyncTask in Android 4.0

2012-05-16 Thread Emanuele Ricci
Hi Michael do you have some good alternative to the current AsyncTask 
implementation?

Anyway the real big big big problem is for the 3rd party library or SDK 
that my project is currently used.
I'm using some ads SDK and I'm pretty sure that they are using also 
AsyncTask in the "normal" way so I'm really afraid that their asynctasks 
will block mine for the "serial problem" we were discussing.

On Saturday, April 21, 2012 5:38:47 AM UTC+2, MichaelEGR wrote:
>
> On Apr 20, 12:16 pm, Nathan  wrote: 
> > In my opinion, this a deplorable punishment for those developers who 
> have 
> > dutifully followed the AsyncTask pattern, which, to this day, the 
> Android 
> > platform has encouraged. 
>
> Add it to the list... ;)   I can't exactly call the unfurling Android 
> SDK responsible API development. Quick and efficient if one judges 
> efficiency by market share. Yes yes everyone works hard on the Android 
> team, so do we your end users. When I saw AsyncTask pop up in 1.5 I 
> thought to myself why oh why is there such a lightweight abstraction 
> being offered over the already fine and dandy Executor framework as 
> AsyncTask doesn't exactly add all too much. Granted I already had a 
> nice abstraction layer on top of the Executor framework carried over 
> from the desktop, so AsyncTask seemed quite moot and as we now see a 
> bit destructive in terms of default behavior when one is trying to 
> target the larger ecosystem. Also I don't have the time to go back and 
> check 1.5 sources for this conversation, but I'd be really curious to 
> see if the original AsyncTask didn't use the Executor framework 
> underneath; that would be telling. 
>
> I actually planned on discussing this as 1 of 5 main topics for my 
> AnDevCon class coming up next month ("Java performance tricks for the 
> troubles"); this certainly classifies as a big trouble (more so than I 
> thought with the change in default behavior for AsyncTask) and now 
> it's definitely in the class. I'll present my abstraction over the 
> Executor framework; it's of course component oriented and can easily 
> be extended. The one thing that cracks me up is that with not a whole 
> lot of work one can still use a single ThreadPoolExecutor and 
> simultaneously submit tasks to be run in a single queue manner or all 
> tasks at once up to the pool limit. I also have a long running pending 
> Executor submitter system component that is very handy for the GUI 
> checkbox example a previous poster mentioned that saves state each 
> press of the checkbox. In that particular submitter if a current task 
> is running the latest task is stored as pending, each successive press 
> of the checkbox (or any GUI element) replaces the pending task while 
> one is executing. Instead of queuing up 30 tasks to run with 30 
> presses of the checkbox if a user rapidly presses the checkbox and 
> there is a long running task kicked off just the first and last 
> presses get tasks submitted. 
>
> So basically the advice I'm offering is to copy / modify AsyncTask as 
> necessary in ones own package or ditch usage of AsyncTask entirely and 
> adopt a solid existing framework that won't change or simply 
> investigate the Executor framework directly and build your own 
> abstraction. It's the only foolproof way to get reliable task 
> execution across all versions of Android and it is pointless / very 
> bad style to embed conditional logic based on API level to limp along 
> using AsyncTask. I know the Android team is just trying to provide a 
> helper functionality, but to change the default behavior like this is 
> yet another API sin; IMHO 
>
> This revelation in the change of default behavior really demands an 
> Android Dev blog post and the clearest possible documentation to be 
> posted.

-- 
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 detect bluetooth headset is connect in SDK 9?

2012-03-23 Thread Emanuele Ricci
That action is fired when you UNPLUG the headset or the bt device as 
explained in the description

On Friday, October 28, 2011 3:14:46 PM UTC+2, lbendlin wrote:
>
>
> http://developer.android.com/​reference/android/media/​AudioManager.html#ACTION_​AUDIO_BECOMING_NOISY
>
> might give you a lever. Subscribe to the notifications and see if this one 
> gets fired.
>

-- 
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 join Android Media query search suggest

2012-01-02 Thread Emanuele Ricci
 

I will explain a little more my scenario.

I'm extending the default music player with other features and 
informations. So I've a sqlite db where I store those informations in 
addiction of the MediaStore.

I want to extend the default search suggestions (for audio) with 
suggestions from my databse.

How can I do it?

I think that the 2 easiest ways are to:

   - Join the default search suggestion to add my results
   - Or understand where Android is doing the dirty work and merge the 
   actual cursor with mine. 

For the second solution I need to know where is the source code of those 
functions. I really prefear the second solution because I also want to 
learn how to do that things!

Thank you very much. 

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

[android-developers] Re: listview adapter. Recycle bitmap

2011-10-16 Thread emanuele
Putting the bitmap reference in the convertview tag and retrieve the
tag when
The getview is called could be a solution?

On 17 Ott, 04:41, IcedNet  wrote:
> You should look into Romain Guy's 2009/10 Google I/O presentations on
> UI -- he is the whip with ListViews/UI.
> If you're looking for what I think you're looking to do -- which is
> speed up that list view -- he has a view holder pattern that will do
> just that.
>
> Peace,
> Dan
>
> On Oct 16, 10:08 pm, Studio LFP  wrote:
>
>
>
> > Based on the code there, you wouldn't have the chance to recycle the bitmap
> > as you don't keep a handle to it anywhere.
>
> > Then again, if the ListView discards that particular row and you aren't
> > retaining any handles to the bitmap, then the bitmap should be scheduled for
> > collection by the GC. If you did try to retrieve the view that was holding
> > the image from the ListView and it did return it to you, there is a good
> > chance the ListView still wants to use it and you would not want to release
> > the bitmap.
>
> > Is there a reason you are wanting to try to recycle the bitmap?
>
> > Also, we are talking about the recycle() function on bitmap and not reusing
> > the same bitmap, correct?
>
> > Steven
> > Studio LFPhttp://www.studio-lfp.com
>
> > On Sunday, October 16, 2011 4:14:48 AM UTC-5, emanuele wrote:
>
> > > Hello guys.. that s my baseAdapter getview implmentation:
>
> > > @Override
> > > public View getView(int position, View convertView, ViewGroup parent)
> > > {
>
> > > int type = getItemViewType(position);
> > > if (convertView == null) {
> > > switch (type) {
> > > case TYPE_BIG_NEWS:
> > > convertView = mInflater.inflate(R.layout.big_news, null);
> > > break;
> > > case TYPE_NORMAL_NEWS:
> > > convertView = mInflater.inflate(R.layout.normal_news, null);
> > > break;
> > > default:
> > > break;
> > > }
> > > }
>
> > > ImageView thumb = (ImageView)
> > > convertView.findViewById(R.id.thumbId);
>
> > > File f = null;
> > > if (filename != null)
> > > f = mFileCache.getFile(i.newsKey, filename);
> > > if (f == null) {
> > > if (mGetThumbsThread != null && filename != null) {
> > > Log.i(TAG, "cache miss");
> > > thumbLinks.offer(new ThumbRequest(i.newsKey, i.thumbLink,
> > > i.thumbName));
> > > mGetThumbsThread.signal();
> > > }
> > > thumb.setImageResource(placeHolder);
> > > } else {
> > > Log.i(TAG,
> > > "file bitmap cached: " + f.getName() + " size: " + f.length() /
> > > 1024);
> > > bitmap = BitmapFactory.decodeFile(f.getAbsolutePath());
> > > thumb.setImageBitmap(bitmap);
> > > }
>
> > > return convertView;
> > > }
>
> > > Every row is compound of text and an ImageView. Is there any chance to
> > > recycle the bitmap I use in the getView?

-- 
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] listview adapter. Recycle bitmap

2011-10-16 Thread emanuele
Hello guys.. that s my baseAdapter getview implmentation:

@Override
public View getView(int position, View convertView, ViewGroup parent)
{

int type = getItemViewType(position);
if (convertView == null) {
switch (type) {
case TYPE_BIG_NEWS:
convertView = 
mInflater.inflate(R.layout.big_news, null);
break;
case TYPE_NORMAL_NEWS:
convertView = 
mInflater.inflate(R.layout.normal_news, null);
break;
default:
break;
}
}

ImageView thumb = (ImageView)
convertView.findViewById(R.id.thumbId);




File f = null;
if (filename != null)
f = mFileCache.getFile(i.newsKey, filename);
if (f == null) {
if (mGetThumbsThread != null && filename != 
null) {
Log.i(TAG, "cache miss");
thumbLinks.offer(new 
ThumbRequest(i.newsKey, i.thumbLink,
i.thumbName));
mGetThumbsThread.signal();
}
thumb.setImageResource(placeHolder);
} else {
Log.i(TAG,
"file bitmap cached: " + 
f.getName() + " size: " + f.length() /
1024);
bitmap = 
BitmapFactory.decodeFile(f.getAbsolutePath());
thumb.setImageBitmap(bitmap);
}

return convertView;
}


Every row is compound of text and an ImageView. Is there any chance to
recycle the bitmap I use in the getView?

-- 
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] Memory retained by fragments android

2011-10-15 Thread emanuele
Hello there, could somebody explain me when the memory retained by
fragment is released?
For instance, If I have a fragment into the back stack and i call
popBackStack with the inclusive flag, all the resource allocate with
the fragment would be freed? What If I call remove on transaction
instead?

thanks 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


[android-developers] ListFragment addHeaderView and addFooterView issue

2011-10-09 Thread emanuele
hello there,

I ve two ListFragments maganed by a tabhost. Firt time I switch
between tab all is alright. The headerView is correctly added. The
second time I switch between fragment I get this execption:

10-05 15:15:01.585: ERROR/AndroidRuntime(23263):
java.lang.IllegalStateException: Cannot add header view to list --
setAdapter has already been called. 10-05 15:15:01.585: ERROR/
AndroidRuntime(23263): at
android.widget.ListView.addHeaderView(ListView.java:261) 10-05
15:15:01.585: ERROR/AndroidRuntime(23263): at
android.widget.ListView.addHeaderView(ListView.java:284) 10-05
15:15:01.585: ERROR/AndroidRuntime(23263): at
it.mypackage.archive.ArchiveFragment.onActivityCreated(ArchiveFragment.java:
199) 10-05 15:15:01.585: ERROR/AndroidRuntime(23263): at
android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:
858) 10-05 15:15:01.585: ERROR/AndroidRuntime(23263): at
android.support.v4.app.FragmentManagerImpl.attachFragment(FragmentManager.java:
1183)

and the app crashes. The code I use to add the header view follows:


   @Override
public void onActivityCreated(Bundle arg0) {
super.onActivityCreated(arg0);
getListView().setOnScrollListener(this);
getListView().addHeaderView(searchBox);
setListAdapter(mAdapter);
}


I manage to fix (??) setting the list adapter to null befor adding the
header view but it does not seems a good thing to me.


   @Override
public void onActivityCreated(Bundle arg0) {
super.onActivityCreated(arg0);
 setListAdapter(null);
   getListView().setOnScrollListener(this);
getListView().addHeaderView(searchBox);
setListAdapter(mAdapter);
}



Adding footer instead I have the following crash:


10-09 18:45:13.866: ERROR/AndroidRuntime(18191):
java.lang.NullPointerException
10-09 18:45:13.866: ERROR/AndroidRuntime(18191): at
android.widget.AdapterView
$AdapterDataSetObserver.onChanged(AdapterView.java:778)
10-09 18:45:13.866: ERROR/AndroidRuntime(18191): at
android.widget.ListView.addFooterView(ListView.java:346)
10-09 18:45:13.866: ERROR/AndroidRuntime(18191): at
android.widget.ListView.addFooterView(ListView.java:361)
10-09 18:45:13.866: ERROR/AndroidRuntime(18191): at
it.mypackage.category.CategorySearchFragment.onActivityCreated(CategorySearchFragment.java:
131)
10-09 18:45:13.866: ERROR/AndroidRuntime(18191): at
android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:
858)
10-09 18:45:13.866: ERROR/AndroidRuntime(18191): at
android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:
1041)
10-09 18:45:13.866: ERROR/AndroidRuntime(18191): at
android.support.v4.app.BackStackRecord.popFromBackStack(BackStackRecord.java:
687)
10-09 18:45:13.866: ERROR/AndroidRuntime(18191): at
android.support.v4.app.FragmentManagerImpl.popBackStackState(FragmentManager.java:
1392)
10-09 18:45:13.866: ERROR/AndroidRuntime(18191): at
android.support.v4.app.FragmentManagerImpl.popBackStackImmediate(FragmentManager.java:
438)
10-09 18:45:13.866: ERROR/AndroidRuntime(18191): at
android.support.v4.app.FragmentActivity.onBackPressed(FragmentActivity.java:
156)


in order to add the footer I run the following snippet

 @Override
public void onActivityCreated(Bundle arg0) {
super.onActivityCreated(arg0);
 setListAdapter(null);
   getListView().setOnScrollListener(this);
getListView().addHeaderView(searchBox);
if (footer != null) {

getListView().addFooterView(footer);
}
setListAdapter(mAdapter);
}


What am I doing 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] Fragment Rotation and WebView

2011-10-02 Thread emanuele
Hello guys, in my design I have a FragmentActivity (FA) with a
ListFragment (LF). When user clicks on an item, a new fragment
composed of a webview with some information is shown, when a the
mobile is in portrait and a FragmentDialog is shown when the mobile is
in landscape. After some times I go through portrait to landscape, I
analyzed the memory with the eclipse MAT, and found multiple instance
of my FragmentActivity. It seems related to the WebView, since if I no
longer use the webview the issue disappear. So my questions are:

1. Best way to manage the rotation
2. what s wrong with the webview?

Note: I want to rotate only the fragment but not the ListFragment

-- 
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] popbackstack in fragmetns

2011-09-27 Thread emanuele
Hello there, in my design I ve 4 ListFragments managed by a
FrameActivity with tabhosts. For every ListFragment  i keep its
history (addToBackStack(String name)). Switching beetwen ListFragment
I want to clear the tab content and display the content of the new
ListFragment. In the FrameActivity I tried to achive with
popBackStack(String name, POP_BACK_STACK_INCLUSIVE), but it seems like
the first entry of the ListFragment I am popping back is added to a
transaction and executed at commit. Is this the correct way to achive
the behaviour  I need?

Thanks

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


[android-developers] Re: how start fragments

2011-09-27 Thread emanuele
ok thanks a lot

On Sep 26, 11:35 pm, Mark Murphy  wrote:
> I would recommend that the activity handle all starting of fragments.
> The activity is the code that knows how big the screen is and
> therefore whether these other fragments should be displayed directly
> or displayed by starting another activity. IOW, keep the fragments
> themselves ignorant of screen size to the extent possible.
>
>
>
>
>
>
>
>
>
> On Sat, Sep 24, 2011 at 10:13 AM, emanuele  wrote:
> > Hello guys, I ve the following scenario: A fragmentActivity which
> > manage four different ListFragment. Every ListFragment can launch
> > different kind of fragments and these could launch others fragments.
> > What I need to understand is who can or cannot launch fragments. Is
> > responsability of the FragmentActivity or could be the ListFragment,
> > when onListItemClick is fired, for instance?
>
> > --
> > 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
>
> Warescription: Three Android Books, Plus Updates, One Low Price!

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

2011-09-26 Thread emanuele
Hello guys, I ve the following scenario: A fragmentActivity which
manage four different ListFragment. Every ListFragment can launch
different kind of fragments and these could launch others fragments.
What I need to understand is who can or cannot launch fragments. Is
responsability of the FragmentActivity or could be the ListFragment,
when onListItemClick is fired, for instance?

-- 
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] OpenGL Samsung Galaxy S2 S II Problem With Rotation

2011-09-09 Thread emanuele padula
The problem is that i'm in your same situation but i even use the
mipmapping. Maybe only few changes during initialization can fix it, but
without an sg2 to test is too hard. Anyone has ideas or fixed something
similar on sg2?? Thank you in advance
Il giorno 09/set/2011 16.31, "Marcin Mikosik"  ha
scritto:
> Hi,
> I have the same problem reported by one user of my game (for Galaxy S2).
> Textures that are rotated are either completely invisible or rendered
> incorrectly.
>
> I use opengl 1.0, without VBO and without mipmapping.
> As I do not have access to galaxy S2 I would be grateful if you post your
> solution once you find it.
>
> thanks
> marcin
>
> On Tue, Sep 6, 2011 at 1:03 AM, emanuele padula 
wrote:
>
>> Thank you Christopher. I'll do some test regarding the mipmapping, but
i'm
>> not sure that it will work. Thank you for you suggestion.
>>
>>
>> 2011/9/5 Christopher Van Kirk 
>>
>>> I'm seeing a similar problem on that device, but I haven't spent any
time
>>> looking for an answer yet. I see that you're using VBOs...I've read
>>> somewhere that some devices have trouble with them but I don't know if
it's
>>> true or which devices might be affected. I also know that in my case I'm
>>> also using VBOs, but I'm not rotating the texture, I'm stretching it
without
>>> a mipmap, and it's a JPEG.
>>>
>>> Sorry couldn't be more help.
>>>
>>>
>>> On 9/5/2011 10:15 PM, pad wrote:
>>>
>>>> Hi,
>>>> I have a huge problem ONLY with SAMSUNG GALAXY S2 and i cannot figure
>>>> out if the problem is my code or of this device!!
>>>>
>>>> ON ALL OTHER PHONES IT WORKS GREAT!!
>>>>
>>>> I'm Using ONLY OpenGL 1.0.
>>>>
>>>> The problem is that with the code below my game cannot draw the object
>>>> that need rotation (the objects are not visualized on the screen).
>>>> Objects with no rotation (angle = 0.0) are drawn perfectly.
>>>>
>>>> ONLY on samsung galaxy s2 the rotated images are not visualized on the
>>>> screen. There is some bug in SG2 that i have to take in cosideration
>>>> or some specific initialization?
>>>>
>>>> Can you help me???
>>>>
>>>> Thank you in advance
>>>>
>>>> public static void drawBitmap(final GL10 gl, final float x, final
>>>> float y,
>>>> final float rotate_x, final float rotate_y, final MyImage m,
>>>> final float angle) {
>>>>
>>>> // Draw using verts or VBO verts.
>>>> gl.glPushMatrix();
>>>> // gl.glLoadIdentity();
>>>>
>>>> final int indexPerTile = TextureManager.INDEX_PER_TILE;
>>>> final int indexRow = m.fx.row * TextureManager.INDEX_PER_TILE
>>>> * TextureManager.TILE_PER_ROW;
>>>>
>>>> if (angle == 0.0f) {
>>>>
>>>> gl.glTranslatef(x, y, 0f);
>>>> gl.glScalef(m.scaleWidth, m.scaleHeight, 1);
>>>> m.fx.grid.drawStrip(gl, true, indexRow,
>>>> indexPerTile);// the
>>>> code of this method is below
>>>>
>>>> if (m.alpha != 1 || m.red != 1 || m.blue != 1 ||
>>>> m.green != 1) {
>>>> gl.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
>>>> }
>>>>
>>>> } else {
>>>>
>>>> final float xt = rotate_x;
>>>> final float yt = rotate_y;
>>>> gl.glTranslatef(xt, yt, 0f);
>>>> gl.glRotatef(-angle, 0f, 0f, 1.0f);
>>>> gl.glTranslatef(-xt + x, -yt + y, 0f);
>>>> gl.glScalef(m.scaleWidth, m.scaleHeight, 1);
>>>>
>>>> m.fx.grid.drawStrip(gl, true, indexRow, indexPerTile); // the
>>>> code of this method is below
>>>>
>>>> if (m.alpha != 1 || m.red != 1 || m.blue != 1 || m.green !=
>>>> 1) {
>>>> gl.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
>>>> }
>>>> }
>>>>
>>>> gl.glPopMatrix();
>>>> }
>>>>
>>>>
>>>> public void drawStrip(final GL10 gl, final boolean useTexture,
>>>> final int startIndex,
>>>> final int indexCount) {
>>>> int count = indexCount;
>>>> if (startIndex + indexCount>= this.mIndexCount) {
>>>> count = this.mIndexCount - startIndex;
>>>> }
>>>>
>>>> gl.glDrawElements(GL10.GL_**TRIANGLES, count,
>>>> GL10.GL_UNSIGNED_SHORT,
>>>> this.mIndexBuffer.position(**startIndex));
>>>>
>>>> }
>>>>
>>>>
>>>
>> --
>> 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] OpenGL Samsung Galaxy S2 S II Problem With Rotation

2011-09-05 Thread emanuele padula
Thank you Christopher. I'll do some test regarding the mipmapping, but i'm
not sure that it will work. Thank you for you suggestion.

2011/9/5 Christopher Van Kirk 

> I'm seeing a similar problem on that device, but I haven't spent any time
> looking for an answer yet. I see that you're using VBOs...I've read
> somewhere that some devices have trouble with them but I don't know if it's
> true or which devices might be affected. I also know that in my case I'm
> also using VBOs, but I'm not rotating the texture, I'm stretching it without
> a mipmap, and it's a JPEG.
>
> Sorry couldn't be more help.
>
>
> On 9/5/2011 10:15 PM, pad wrote:
>
>> Hi,
>> I have a huge problem ONLY with SAMSUNG GALAXY S2 and i cannot figure
>> out if the problem is my code or of this device!!
>>
>> ON ALL OTHER PHONES IT WORKS GREAT!!
>>
>> I'm Using ONLY OpenGL 1.0.
>>
>> The problem is that with the code below my game cannot draw the object
>> that need rotation (the objects are not visualized on the screen).
>> Objects with no rotation (angle = 0.0) are drawn perfectly.
>>
>> ONLY on samsung galaxy s2 the rotated images are not visualized on the
>> screen. There is some bug in SG2 that i have to take in cosideration
>> or some specific initialization?
>>
>> Can you help me???
>>
>> Thank you in advance
>>
>> public static void drawBitmap(final GL10 gl, final float x, final
>> float y,
>>  final float rotate_x, final float rotate_y, final MyImage m,
>> final float angle) {
>>
>>   // Draw using verts or VBO verts.
>>   gl.glPushMatrix();
>>   // gl.glLoadIdentity();
>>
>>   final int indexPerTile = TextureManager.INDEX_PER_TILE;
>>   final int indexRow = m.fx.row * TextureManager.INDEX_PER_TILE
>> * TextureManager.TILE_PER_ROW;
>>
>>   if (angle == 0.0f) {
>>
>>gl.glTranslatef(x, y, 0f);
>>gl.glScalef(m.scaleWidth, m.scaleHeight, 1);
>>m.fx.grid.drawStrip(gl, true, indexRow,
>> indexPerTile);// the
>> code of this method is below
>>
>> if (m.alpha != 1 || m.red != 1 || m.blue != 1 ||
>> m.green != 1) {
>>gl.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
>> }
>>
>>   } else {
>>
>>  final float xt = rotate_x;
>>  final float yt = rotate_y;
>>  gl.glTranslatef(xt, yt, 0f);
>>  gl.glRotatef(-angle, 0f, 0f, 1.0f);
>>  gl.glTranslatef(-xt + x, -yt + y, 0f);
>>  gl.glScalef(m.scaleWidth, m.scaleHeight, 1);
>>
>>  m.fx.grid.drawStrip(gl, true, indexRow, indexPerTile); // the
>> code of this method is below
>>
>>  if (m.alpha != 1 || m.red != 1 || m.blue != 1 || m.green !=
>> 1) {
>> gl.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
>>  }
>>   }
>>
>>   gl.glPopMatrix();
>>}
>>
>>
>>public void drawStrip(final GL10 gl, final boolean useTexture,
>> final int startIndex,
>>  final int indexCount) {
>>   int count = indexCount;
>>   if (startIndex + indexCount>= this.mIndexCount) {
>>  count = this.mIndexCount - startIndex;
>>   }
>>
>>   gl.glDrawElements(GL10.GL_**TRIANGLES, count,
>> GL10.GL_UNSIGNED_SHORT,
>>this.mIndexBuffer.position(**startIndex));
>>
>>}
>>
>>
>

-- 
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: SQLite complex query and handling results

2011-06-10 Thread Emanuele Ricci
I was talking about ORM in general.
IOSched is not a so little application so maybe creating an ORM tool to
integrate in Android was not a so bad idea :)

On Fri, Jun 10, 2011 at 11:47 AM, Nikolay Elenkov  wrote:

> On Fri, Jun 10, 2011 at 6:30 PM, Emanuele Ricci  wrote:
> > Why Google in IOSched is not using it?
> >
>
> Why should they? It's a third-party tool, and maybe they decided it's not
> worth
> the trouble.
>
> --
> 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] Re: SQLite complex query and handling results

2011-06-10 Thread Emanuele Ricci
Why Google in IOSched is not using it?

On Fri, Jun 10, 2011 at 11:27 AM, Nikolay Elenkov  wrote:

> On Fri, Jun 10, 2011 at 5:24 PM, Emanuele Ricci  wrote:
> > Ok I solved it:
> >
> > SELECT posts.post_id, posts.post_title,
> > GROUP_CONCAT(categories.category_name) AS categories_name,
> > GROUP_CONCAT(categories.category_id) AS categories_id,
> > GROUP_CONCAT(tags.tag_id) AS tags_id, GROUP_CONCAT(tags.tag_name) AS
> > tags_name FROM posts LEFT OUTER JOIN posts_categories ON
> > posts_categories.post_id=posts.post_id LEFT OUTER JOIN categories ON
> > posts_categories.category_id=categories.category_id LEFT OUTER JOIN
> > posts_tags ON posts_tags.post_id=posts.post_id LEFT OUTER JOIN tags ON
> > posts_tags.tag_id=tags.tag_id GROUP BY posts.post_id;
> >
> > Thank you very much for the hint of GROUP_CONCAT!!!
> >
> > Anyway I always think that Android need something to bind Object to DB
> like
> > in web frameworks :)
> >
>
> Of course, such a thing exists :) But if you don't understand how SQL
> works, you still might not get good results.
>
> http://ormlite.com/sqlite_java_android_orm.shtml
>
> --
> 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

R: Re: [android-developers] Re: SQLite complex query and handling results

2011-06-10 Thread Emanuele Ricci
SELECT posts.post_id, posts.post_title, 
GROUP_CONCAT(categories.category_name) AS categories_name, 
GROUP_CONCAT(categories.category_id) AS categories_id, 
GROUP_CONCAT(tags.tag_id) AS tags_id, GROUP_CONCAT(tags.tag_name) AS 
tags_name FROM posts INNER JOIN posts_categories ON 
posts_categories.post_id=posts.post_id INNER JOIN categories ON 
posts_categories.category_id=categories.category_id INNER JOIN posts_tags ON 
posts_tags.post_id=posts.post_id INNER JOIN tags ON 
posts_tags.tag_id=tags.tag_id;

This doesn't work if I have 0 tag for a post or 0 categor for a post.
Also it display only 1 row with all categories ( I have removed tags part to 
make the example ).

I'm not saying that you are wrong because I've to learn the differences 
between them, I'm only exposing results :)

Thank you for your advice, I will take a look at 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

Re: [android-developers] Re: SQLite complex query and handling results

2011-06-10 Thread Emanuele Ricci
Ok I solved it:

SELECT posts.post_id, posts.post_title,
GROUP_CONCAT(categories.category_name) AS categories_name,
GROUP_CONCAT(categories.category_id) AS categories_id,
GROUP_CONCAT(tags.tag_id) AS tags_id, GROUP_CONCAT(tags.tag_name) AS
tags_name FROM posts LEFT OUTER JOIN posts_categories ON
posts_categories.post_id=posts.post_id LEFT OUTER JOIN categories ON
posts_categories.category_id=categories.category_id LEFT OUTER JOIN
posts_tags ON posts_tags.post_id=posts.post_id LEFT OUTER JOIN tags ON
posts_tags.tag_id=tags.tag_id GROUP BY posts.post_id;

Thank you very much for the hint of GROUP_CONCAT!!!

Anyway I always think that Android need something to bind Object to DB like
in web frameworks :)

-- 
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: SQLite complex query and handling results

2011-06-10 Thread Emanuele Ricci
This is what I get:
http://blobs.ge.tt/8tYJKz4/concat.png?sig=-TB4nxfSNqs5AchU5rFsughxje1g4iFms8w

Only a row :/ Am I wrong?
Anyway I think that this solution doesn't fit the real scenario. I
semplified a bit my query.

In the real usage I want to select:

SELECT posts.post_id, posts.post_title, categories.category_id,
categories.category_name, tags.tag_id, tags.tag_name FROM posts LEFT OUTER
JOIN posts_categories ON posts_categories.post_id=posts.post_id LEFT OUTER
JOIN categories ON posts_categories.category_id=categories.category_id LEFT
OUTER JOIN posts_tags ON posts_tags.post_id=posts.post_id LEFT OUTER JOIN
tags ON posts_tags.tag_id=tags.tag_id;

Because I have also to JOIN tags table :)



On Fri, Jun 10, 2011 at 9:56 AM, Pepijn Van Eeckhoudt <
pep...@vaneeckhoudt.net> wrote:

>  You could use the group_concat aggregation function to concatenate the
> category titles. That way you'll only have a single row per post.
> Another alternative is to simply not use CursorAdapter but write your own
> work-alike instead, possibly starting from the CursorAdapter source code.
>
> Pepijn
>
>
> On 10/06/2011 09:24, Emanuele Ricci wrote:
>
> Maybe you don't understand. I'll make an example
>
> TABLE POSTS:
>
> POST_ID | POST_TITLE
>
> 1   | My first post
> 2   | My second post! Yay!
>
> TABLE CATEGORIES
>
> CAT_ID  | CATEGORY_TITLE
>
> 1  | General
> 2  | Blog
> 3  | Sport
> 4  | Comic
>
> TABLE POSTS_CATEGORIES
>
> POST_ID | CATEGORY_ID
>
> 1 | 1
> 1 | 2
> 1 | 3
> 2 | 2
> 2 | 4
>
> What does it mean? That "My first post" have 3 categories: General, Blog,
> Sport and "My second post! Yay!" have 2 categories: Sport and Comic
>
> So with this query (where I want to load ALL POST with their categories):
>
> SELECT posts.post_id, posts.post_title, categories.category_name FROM posts
> LEFT OUTER JOIN posts_categories ON posts_categories.post_id=posts.post_id
> LEFT OUTER JOIN categories ON
> posts_categories.category_id=categories.category_id;
>
> I'll get this results:
>
> 1 | My first post | General
> 1 | My first post | Blog
> 1 | My first post | Sport
> 2 | My second post! Yay! | Blog
> 2 | My second post! Yay! | Comic
>
> And I think this is the only efficent way to load all my data using only 1
> query to optimize it.
> But: how can I handle all data in my ListFragment with my own Adapter that
> extend CursorAdapter?
>
> I cannot display all 5 post because as you can see we have repetitions.
>
> On Fri, Jun 10, 2011 at 2:15 AM, Zsolt Vasvari  wrote:
>
>>
>> Use a WHERE clause so you only get 2 rows returned.
>>  On Jun 10, 6:17 am, Emanuele Ricci  wrote:
>> > Good evening ( for me ), I'm Emanuele a young android developer.
>> > I want to share with you my problem because I'm not finding a good
>> solution.
>> >
>> > I've 3 tables (in reality 5)
>> >
>> > posts
>> > categories
>> > posts_categories
>> >
>> > to create the many-to-many relation between posts and categories
>> >
>> > I've created a ListFragment to show all my posts with their categories.
>> >
>> > So I've created this query ( I don't write all the code [image: :)] )
>> >
>> > SELECT posts._id, posts.post_title, categories.category_name FROM posts
>> LEFT
>> > OUTER JOIN posts_categories ON posts_categories.post_id=posts.post_id
>> LEFT
>> > OUTER JOIN categories ON
>> > posts_categories.category_id=categories.category_id;
>> >
>> > So if I have 2 post with 2 category each that query will return 4
>> records.
>> > Am I wrong?
>> > So in my Cursor I have 4 record but what I really need is to collect
>> datas
>> > from the cursor and display only what I really need.
>> >
>> > In this case I cannot use a CursorAdapter to display my data because it
>> will
>> > insert 4 item in the ListFragment.
>> >
>> > And I don't want to load only post and than for each post load
>> categories
>> > because if I have 100 posts I will do 1 query to select all posts and
>> 100
>> > query to select categories.
>> >
>> > What can I do? I need an expert advice! Which is the best way to handle
>> this
>> > situation?
>> > Have you ever faced this problem?
>> >
>> > Thank you very much. Emanuele Ricci.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send em

Re: [android-developers] Re: SQLite complex query and handling results

2011-06-10 Thread Emanuele Ricci
Maybe you don't understand. I'll make an example

TABLE POSTS:

POST_ID | POST_TITLE

1   | My first post
2   | My second post! Yay!

TABLE CATEGORIES

CAT_ID  | CATEGORY_TITLE

1  | General
2  | Blog
3  | Sport
4  | Comic

TABLE POSTS_CATEGORIES

POST_ID | CATEGORY_ID

1 | 1
1 | 2
1 | 3
2 | 2
2 | 4

What does it mean? That "My first post" have 3 categories: General, Blog,
Sport and "My second post! Yay!" have 2 categories: Sport and Comic

So with this query (where I want to load ALL POST with their categories):

SELECT posts.post_id, posts.post_title, categories.category_name FROM posts
LEFT OUTER JOIN posts_categories ON posts_categories.post_id=posts.post_id
LEFT OUTER JOIN categories ON
posts_categories.category_id=categories.category_id;

I'll get this results:

1 | My first post | General
1 | My first post | Blog
1 | My first post | Sport
2 | My second post! Yay! | Blog
2 | My second post! Yay! | Comic

And I think this is the only efficent way to load all my data using only 1
query to optimize it.
But: how can I handle all data in my ListFragment with my own Adapter that
extend CursorAdapter?

I cannot display all 5 post because as you can see we have repetitions.

On Fri, Jun 10, 2011 at 2:15 AM, Zsolt Vasvari  wrote:

>
> Use a WHERE clause so you only get 2 rows returned.
> On Jun 10, 6:17 am, Emanuele Ricci  wrote:
> > Good evening ( for me ), I'm Emanuele a young android developer.
> > I want to share with you my problem because I'm not finding a good
> solution.
> >
> > I've 3 tables (in reality 5)
> >
> > posts
> > categories
> > posts_categories
> >
> > to create the many-to-many relation between posts and categories
> >
> > I've created a ListFragment to show all my posts with their categories.
> >
> > So I've created this query ( I don't write all the code [image: :)] )
> >
> > SELECT posts._id, posts.post_title, categories.category_name FROM posts
> LEFT
> > OUTER JOIN posts_categories ON posts_categories.post_id=posts.post_id
> LEFT
> > OUTER JOIN categories ON
> > posts_categories.category_id=categories.category_id;
> >
> > So if I have 2 post with 2 category each that query will return 4
> records.
> > Am I wrong?
> > So in my Cursor I have 4 record but what I really need is to collect
> datas
> > from the cursor and display only what I really need.
> >
> > In this case I cannot use a CursorAdapter to display my data because it
> will
> > insert 4 item in the ListFragment.
> >
> > And I don't want to load only post and than for each post load categories
> > because if I have 100 posts I will do 1 query to select all posts and 100
> > query to select categories.
> >
> > What can I do? I need an expert advice! Which is the best way to handle
> this
> > situation?
> > Have you ever faced this problem?
> >
> > Thank you very much. Emanuele Ricci.
>
> --
> 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] SQLite complex query and handling results

2011-06-09 Thread Emanuele Ricci
Good evening ( for me ), I'm Emanuele a young android developer. 
I want to share with you my problem because I'm not finding a good solution.

I've 3 tables (in reality 5)

posts
categories
posts_categories

to create the many-to-many relation between posts and categories

I've created a ListFragment to show all my posts with their categories.

So I've created this query ( I don't write all the code [image: :)] )

SELECT posts._id, posts.post_title, categories.category_name FROM posts LEFT 
OUTER JOIN posts_categories ON posts_categories.post_id=posts.post_id LEFT 
OUTER JOIN categories ON 
posts_categories.category_id=categories.category_id;

So if I have 2 post with 2 category each that query will return 4 records. 
Am I wrong?
So in my Cursor I have 4 record but what I really need is to collect datas 
from the cursor and display only what I really need.

In this case I cannot use a CursorAdapter to display my data because it will 
insert 4 item in the ListFragment.

And I don't want to load only post and than for each post load categories 
because if I have 100 posts I will do 1 query to select all posts and 100 
query to select categories.


What can I do? I need an expert advice! Which is the best way to handle this 
situation?
Have you ever faced this problem?

Thank you very much. Emanuele Ricci.

-- 
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: native heap size and ddms

2011-01-17 Thread emanuele
Native heap... on Mac.. ddms running standing alone ( i think)

On Mon, Jan 17, 2011 at 5:51 PM, pedr0  wrote:

> But What's the name for the TAB ?
> I saw the same tab of before, this is my file:
>
> #Mon Jan 17 10:20:28 CET 2011
> pingOptIn=true
> pingTime.adt=1295256028304
> pingId=2720243879932964383
> native=true
>
>
>
>
>
>
>
> On 17 Gen, 17:31, blackbelt  wrote:
> > sorry I meant ddms.cfg
>
> --
> 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
>



-- 
Emanuele Gringeri
Computer Engineer
University of Pisa
Be my mirror, my sword and shield

-- 
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] View.onAnimationEnd

2011-01-14 Thread emanuele
Hello guys, i was playing with animations (scaleanimation) and I notice a
thing bit strange.. If while an animation is started I re-instantiate the
animation object and try to restart it, the onAnimationEnd callback in
nerver called. Is that the correct behaviour?

thanks in advance.
-- 
Emanuele Gringeri
Computer Engineer
University of Pisa
Be my mirror, my sword and shield

-- 
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 code for SDK 1.5 and 1.6

2009-09-25 Thread Emanuele

Thanks a lot for the tip. So using this technique the application will
be anyway installed in the device (if I don't specify the
minorSDKVersion in the manifest.xml) even if the device SDK doesn't
have the class I use in the Reflection or wrapper class?

Thanks
Emanuele

On 25 Set, 12:35, "Mark Murphy"  wrote:
> > suppose I have one application developerd for SDK 1.5 and after the
> > issues of the 1.6 I want to add some of the new features in my app but
> > continuing to support SDK 1.5, do I need to mantian two different
> > projects and two different source code?
>
> You can use the reflection techniques described here:
>
> http://android-developers.blogspot.com/2009/04/backward-compatibility...
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.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: ScrollView disappears when the keyboard appears on the screen

2009-08-12 Thread Emanuele

Solution found. Set "adjustPan" for the "android:windowSoftInputMode"
parameter for the activity in the manifest.

Emanuele

On 11 Ago, 16:09, EPecorari  wrote:
> I have the following layout:
>
> 
>
> http://schemas.android.com/apk/res/
> android"
>         android:orientation="vertical" android:layout_width="fill_parent"
>         android:layout_height="wrap_content">
>         http://schemas.android.com/apk/res/
> android"
>                 android:orientation="vertical" 
> android:layout_width="wrap_content"
>                 android:layout_height="wrap_content">
>
>                                          android:textStyle="bold" android:padding="2dip"
> android:layout_width="wrap_content"
>                         android:layout_height="wrap_content"
> android:layout_alignParentLeft="true" />
>
>                                          android:textStyle="bold" android:textSize="12sp"
> android:padding="4dip"
>                         android:clickable="true" 
> android:layout_width="wrap_content"
>                         android:layout_height="wrap_content" 
> android:layout_toRightOf="@id/
> title"
>                         android:textColor="@color/blue_link" />
>         
>
>         http://schemas.android.com/apk/res/
> android"
>                 android:orientation="vertical" 
> android:layout_width="wrap_content"
>                 android:layout_height="wrap_content">
>                  android:text="@string/link_photo"
>                         android:textStyle="bold" android:textSize="12sp"
> android:padding="4dip"
>                         android:clickable="true" 
> android:layout_width="wrap_content"
>                         android:layout_height="wrap_content" 
> android:textColor="@color/
> blue_link" />
>         
>
>                          android:layout_height="wrap_content"
> android:layout_width="fill_parent"
>                 >
>                  xmlns:android="http://schemas.android.com/apk/res/
> android"
>                         android:orientation="vertical" 
> android:layout_width="fill_parent"
>                         android:layout_height="wrap_content">
>                          android:padding="3dip"
>                                 android:scrollHorizontally="true"
> android:layout_width="fill_parent"
>                                 android:layout_height="wrap_content"
>                                  />
>
>                          android:text="@string/
> label_titleField"
>                                 android:layout_width="wrap_content"
> android:layout_height="wrap_content"
>                                 android:visibility="gone" />
>
>                          android:padding="3dip"
>                                 android:scrollHorizontally="true"
> android:layout_width="fill_parent"
>                                 android:layout_height="wrap_content" 
> android:visibility="gone" />
>
>                          xmlns:android="http://schemas.android.com/apk/res/
> android"
>                                 android:orientation="vertical" 
> android:layout_width="wrap_content"
>                                 android:layout_height="wrap_content">
>
>                                  android:text="@string/
> button_updateStatus"
>                                         android:layout_width="wrap_content"
> android:layout_height="wrap_content" />
>
>                                  android:text="@string/
> button_removePhoto"
>                                         android:layout_width="wrap_content"
> android:layout_height="wrap_content"
>                                         
> android:layout_toRightOf="@id/updateStatusButton"
>                                         android:visibility="gone" />
>                         
>
>                          android:layout_width="wrap_content"
>                                 android:layout_height="wrap_content" 
> android:scaleType="fitCenter"
>                                 android:layout_gravity="cent

[android-developers] EditText and Virtual Keyboard

2009-06-22 Thread Emanuele Di Saverio
Hi all,
I was fillding with EditText and handling of events, and I was wondering on
a strange thing:

If you press some of the keys (for example forward slash '/') on the
emulated physical keyboard, the keyevents are called
as usual (onKeydown, the KeyListeners etc).
If I click on the corresponding virtual key on the onscreen virtual
keyboard, all these callbacks do not get called at all!
This is strange, given that If I press other keys like alhpanumerical, the
events are called.

Can someone explain me this behaviour of the EditText component?
Thanks a lot

-Emanuele

--~--~-~--~~~---~--~~
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] Log vs Logger

2009-03-16 Thread Emanuele Di Saverio
Hello all guys,I was taking a peek at Android doc for Log and Logger class.
I see that the common use is to stick to Log.x methods, but I also see some
useful methods on Logger (like log a method entering and exit).

Could you pick me an example of usage of the Logger class? Maybe this thing
should only be used when building custom loggers?

Thanks

-Emanuele

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