Win a copy of Fixing your Scrum this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Unable to resume activity - NullPointerException

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
radio_player1.xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/relativecontainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<ImageView
android:id="@+id/albumart_image"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:contentDescription="@string/loading_"
android:scaleType="centerCrop"
android:src="@drawable/albumart_innerbg" />

<LinearLayout
android:id="@+id/fulllinearcontainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<LinearLayout
android:id="@+id/slidingpane"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="8"
android:orientation="vertical" >

<com.ironone.streaming.application.MySlidingPaneLayout
android:id="@+id/pane"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<FrameLayout
android:id="@+id/pane1"
android:layout_width="match_parent"
android:layout_height="match_parent" />

<FrameLayout
android:id="@+id/pane2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true" />
</com.ironone.streaming.application.MySlidingPaneLayout>
</LinearLayout>

<LinearLayout
android:id="@+id/linear_nowplayingcontainer_"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2.2"
android:background="@color/black"
android:gravity="top|center_horizontal"
android:orientation="vertical" >

<TextView
android:id="@+id/nowPlayingInfo_one"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Welcome..."
android:textAppearance="?android:attr/textAppearanceSmall"
android:textSize="18sp" />

<TextView
android:id="@+id/nowPlayingInfo_two"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="Enjoy our mobile experience!"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textSize="18sp" />

<TextView
android:id="@+id/nowPlayingInfo_screenname"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="bottom|right"
android:layout_marginRight="5dp"
android:layout_marginTop="10dp"
android:gravity="bottom"
android:text=" "
android:textColor="@color/gray"
android:typeface="sans" />
</LinearLayout>

<LinearLayout
android:id="@+id/orangeline"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.15"
android:background="@drawable/orangeline"
android:orientation="vertical" >
</LinearLayout>

<LinearLayout
android:id="@+id/linear_bottomcontainer"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.5"
android:background="@color/gray_dark"
android:gravity="center_vertical"
android:orientation="horizontal" >

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<ToggleButton
android:id="@+id/togglehdbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="20dp"
android:background="@drawable/toggle_hd_button"
android:onClick="onClick_toggleHDClicked"
android:textOff=""
android:textOn="" />

<ImageView
android:id="@+id/powered_by_blue_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:contentDescription="@string/loading_"
android:src="@drawable/powered_by_blue" />

<ImageView
android:id="@+id/powered_by_gray_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:contentDescription="@string/loading_"
android:src="@drawable/powered_by_gray" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>

<ToggleButton
android:id="@+id/toggleplaybutton"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="5dp"
android:background="@drawable/toggle_play_button"
android:onClick="onClick_togglePlayClicked"
android:textOff=""
android:textOn="" />

<ImageView
android:id="@+id/playbtn_loadingcircle"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="5dp"
android:contentDescription="@string/loading_"
android:src="@drawable/play_btn_loading_circle" />

</RelativeLayout>


radio_player2.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/relativecontainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<ImageView
android:id="@+id/albumart_image"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:contentDescription="@string/loading_"
android:scaleType="centerCrop"
android:src="@drawable/albumart_innerbg" />

<LinearLayout
android:id="@+id/fulllinearcontainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<LinearLayout
android:id="@+id/slidingpane"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="16"
android:orientation="vertical" >

<com.ironone.streaming.application.MySlidingPaneLayout
android:id="@+id/pane"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<FrameLayout
android:id="@+id/pane1"
android:layout_width="match_parent"
android:layout_height="match_parent" />

<FrameLayout
android:id="@+id/pane2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true" />
</com.ironone.streaming.application.MySlidingPaneLayout>
</LinearLayout>

<LinearLayout
android:id="@+id/linear_bottomcontainer"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="5"
android:background="@color/blue_theme"
android:gravity="center"
android:orientation="vertical" >

<LinearLayout
android:id="@+id/orangeline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:background="@drawable/orangeline"
android:orientation="vertical" >
</LinearLayout>

<LinearLayout
android:id="@+id/exceptorangeline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/blue_theme"
android:gravity="bottom"
android:orientation="horizontal" >

<RelativeLayout
android:id="@+id/play_button_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >

<ToggleButton
android:id="@+id/toggleplaybutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:background="@drawable/toggle_play_button"
android:onClick="onClick_togglePlayClicked"
android:paddingRight="10dp"
android:textOff=""
android:textOn="" />

<ImageView
android:id="@+id/playbtn_loadingcircle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerHorizontal="true"
android:contentDescription="@string/loading_"
android:paddingBottom="10dp"
android:paddingRight="10dp"
android:src="@drawable/play_btn_loading_circle" />
</RelativeLayout>

<RelativeLayout
android:id="@+id/exceptPlayButtonAndLine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@+id/play_button_container" >

<ToggleButton
android:id="@+id/togglehdbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/linear_nowplayingcontainer_"
android:background="@drawable/toggle_hd_button"
android:onClick="onClick_toggleHDClicked"
android:paddingTop="20dp"
android:textOff=""
android:textOn="" />

<LinearLayout
android:id="@+id/linear_nowplayingcontainer_"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/powered_by_blue_icon"
android:layout_alignParentRight="true"
android:background="@color/blue_theme"
android:gravity="right"
android:orientation="horizontal"
android:padding="10dp" >

<TextView
android:id="@+id/nowPlayingInfo_one"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Now playing|"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textSize="18sp" />

<TextView
android:id="@+id/nowPlayingInfo_two"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Enjoy!"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textSize="18sp" />
</LinearLayout>
<!-- end of now playing container -->

<TextView
android:id="@+id/nowPlayingInfo_screenname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/linear_nowplayingcontainer_"
android:text="gfdhdfh "
android:textColor="@color/white"
android:visibility="visible"
android:typeface="sans" />

<ImageView
android:id="@+id/nowPlayingInfo_screenname_underline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/nowPlayingInfo_screenname"
android:src="@drawable/loading_bar"
android:visibility="visible" />

<ImageView
android:id="@+id/powered_by_blue_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:contentDescription="@string/loading_"
android:padding="15dp"
android:src="@drawable/powered_by_blue"
android:visibility="invisible" />

<ImageView
android:id="@+id/powered_by_gray_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:contentDescription="@string/loading_"
android:padding="15dp"
android:src="@drawable/powered_by_gray"
android:visibility="invisible" />
</RelativeLayout>
<!-- end of exceptPlayButtonAndLine -->
</LinearLayout>
<!-- end of exceptorangeline -->
</LinearLayout>
<!-- end of linear_bottomcontainer -->
</LinearLayout>
<!-- end of full linear container -->

</RelativeLayout>

problem is first one is working fine. Second one not... give null pointer exception..

only the different is there is an extra image loadingbar in the second one. And it is rearranged... What might be the error? help me...
 
joke time: What is brown and sticky? ... ... ... A stick! Use it to beat this tiny ad!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic