ERNICommunity / erni-moods-android

Android ERNI moods app (Hack Sessions)
0 stars 0 forks source link

Crash after select NearMe tab #5

Closed guslong closed 10 years ago

guslong commented 10 years ago

After uncommenting the line 223 in EntryPoint (ft.replace(R.id.fragmentContainer, new MoodsNearMeFragment());

The app crashes when you try to select the Near Me button.

Caused by: java.lang.IllegalArgumentException: Binary XML file line #6: Duplicate id 0x7f060006, tag null, or parent id 0xffffffff with another fragment for com.google.android.gms.maps.MapFragment

guslong commented 10 years ago

Somehow the fact that the Fragment contains a nested MapFragment might be the issue here. A 'duplicate' id is created.

see also http://stackoverflow.com/questions/14083950/duplicate-id-tag-null-or-parent-id-with-another-fragment-for-com-google-androi

elgrangrifon45 commented 10 years ago

Googled a bit and this seems to be the problem. You shouldn't nest fragments. There might be two approaches: http://stackoverflow.com/questions/19353255/how-to-put-google-maps-v2-on-a-fragment-using-viewpager http://stackoverflow.com/questions/20583392/nesting-google-map-fragment-inside-custom-fragment

Haven't looked at it in detail yet.

guslong commented 10 years ago

Yeah I thought the same thing. I wonder if the MoodsNearMeFragment can simply extend the MapFragment class?

On Fri, Sep 19, 2014 at 9:29 AM, elgrangrifon45 notifications@github.com wrote:

Googled a bit and this seems to be the problem. You shouldn't nest fragments. There might be two approaches:

http://stackoverflow.com/questions/19353255/how-to-put-google-maps-v2-on-a-fragment-using-viewpager

http://stackoverflow.com/questions/20583392/nesting-google-map-fragment-inside-custom-fragment

Haven't looked at it in detail yet.

— Reply to this email directly or view it on GitHub https://github.com/ERNICommunity/erni-moods-android/issues/5#issuecomment-56145400 .

Angus Long mail@anguslong.net

Mutschellenstrasse 56 8038 Zurich Switzerland

Tel: +41 774 325241

elgrangrifon45 commented 10 years ago

I think I solved it, at least i got it running. Can you test it? If it works I'm going to post the solution.

-1hourofovertime

guslong commented 10 years ago

seems to work now.