My app has an StreetViewPanoramaFragment in a framelayout above a SupportMapFragment and I dynamically show the street view when someone clicks a location marker on the map.
In my bug tracking system I saw a lot of crashes related to accessibility and I was able to reproduce the same crash when I turned on 'Talkback' in the accessibility settings.
The exception:
java.lang.RuntimeException: Callbacks must set parent bounds in populateNodeForVirtualViewId()
at iv.a(SourceFile:56)
at iw.a(SourceFile:716)
at hq.a(SourceFile:112)
at hw.createAccessibilityNodeInfo(SourceFile:42)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchAccessibilityNodeInfos(AccessibilityInteractionController.java:724)
at android.view.AccessibilityInteractionController.findAccessibilityNodeInfoByAccessibilityIdUiThread(AccessibilityInteractionController.java:147)
at android.view.AccessibilityInteractionController.access$300(AccessibilityInteractionController.java:49)
at android.view.AccessibilityInteractionController$PrivateHandler.handleMessage(AccessibilityInteractionController.java:971)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5140)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
at dalvik.system.NativeStart.main(Native Method)
The relevant layout part:
<FrameLayout
android:id="#+id/places_map_holder"
android:layout_width="match_parent"
android:layout_weight=".45"
android:layout_height="0dp">
<fragment
android:id="#+id/places_map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment"
android:paddingTop="8dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingBottom="32dp"
map:cameraTilt="30" />
<fragment
android:id="#+id/streetviewpanorama"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
class="com.google.android.gms.maps.SupportStreetViewPanoramaFragment" />
</FrameLayout>
The show/hide relevant code code:
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.setCustomAnimations(R.anim.slide_down, R.anim.fade_out,
R.anim.slide_down, R.anim.fade_out);
if (show) {
ft.show(mSvpFragment);
} else {
ft.hide(mSvpFragment);
}
// commit and etc
Has anyone encountered this problem ? Any solution anyone ?
Using attributes
android:accessibilityLiveRegion="none"
android:importantForAccessibility="no"
for StreetViewPanoramaFragment's container (probably will work with the direct applying to the PanoramaFragment or PanoramaView) in addition to hiding the container when talkback enabled works for me.
Related
I want to add two fragments when the device is tablet(landscape). But i get the next Error:
java.lang.IllegalArgumentException: No view found for id 0x7f0d006d (com.example.placesearch1:id/container2) for fragment FragMap
I created two layouts : main_activity(for phone):
<FrameLayout
android:id="#+id/container1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true">
</FrameLayout>
and main_activity (for tablet landscape - activity_main.xml(sw600dp-land) :
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
>
<FrameLayout
android:id="#+id/container1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
</FrameLayout>
<FrameLayout
android:id="#+id/container2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
</FrameLayout>
</LinearLayout>
I have RecycleView of places(main_activity layout in container1). When i click the item, i get an latitude and longitude of a place and pass the values with bundle to Map fragment and put the map into one of the containers : if device is phone then in container1, but if device is tablet then in container2.
If the device is phone it works perfectly, but if the device is tablet, then i get an error.
in GetPlace method :
Bundle bundle = new Bundle();
bundle.putDouble("lat", place.getLat());
bundle.putDouble("lng", place.getLng());
FragMap fragMap = new FragMap();
fragMap.setArguments(bundle);
if(getResources().getBoolean(R.bool.isTab)) {
getSupportFragmentManager().beginTransaction()
.replace(R.id.container1, new ListFragment())
.replace(R.id.container2, fragMap)
.addToBackStack(null)
.commit();
}
else {
getSupportFragmentManager().beginTransaction()
.replace(R.id.container1, fragMap)
.addToBackStack(null)
.commit();
}
usually when you are designing the xml for phone or tablet the file should be same and also in both xml the content should be same. But here in your case for phone there is only one framelayout but for tablet why two framelayout
Remove this line from GetPlace method
.replace(R.id.container1, new ListFragment())
I'm trying to make a custom ListView item which contains one image and two textviews. They are supposed to line up horizontally (showing up side by side). However, the second TextView always comes out as null and causing the setText method to crash. I'm not sure why it is null even though I already set it so any help would be great. I am 100% sure the crash is NullpointerException as the logcat says so.
Sorry in advance if I'm doing not normal in my code as I just started out with Android development.
Here's my xml for the ListView item:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:layout_width="250dp"
android:layout_height="250dp"
android:id="#+id/category"
android:paddingBottom="5dp"
android:paddingLeft="10dp"
android:paddingTop="5dp"
android:paddingRight="10dp"/>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<TextView
android:id="#+id/message"
android:layout_width="10dp"
android:layout_height="wrap_content"
android:textSize="19sp"
android:textColor="#000000"
android:textAlignment="center"
android:gravity="left|center_horizontal"/>
<TextView
android:id="#+id/datetext"
android:layout_width="40dp"
android:layout_height="wrap_content"
android:layout_marginRight="30dp"
android:layout_toRightOf="#+id/message"
android:textSize="19sp"
android:textColor="#000000"
android:textAlignment="center"
android:gravity="center_vertical|right"/>
</RelativeLayout>
</LinearLayout>
And here's my getView method in my BaseAdapter class:
#Override
public View getView(int position, View convertView, ViewGroup parent) {
View view = convertView;
if (view == null) {
view = inflater.inflate(R.layout.custom_list_item, null);
}
TextView txtAlert = (TextView) view.findViewById(R.id.message);
// This is showing up as NULL
TextView txtDate = (TextView) view.findViewById(R.id.datetext);
ImageView imgCategory = (ImageView) view.findViewById(R.id.category);
// alert is a String
txtAlert.setText(alert);
// date is a String; crashes here
txtDate.setText(date);
return view;
}
Thanks!
EDIT: Here's the stack trace from the logcat if people are still looking at this post. ALSO, it is interesting to note any other TextView objects I add on will result in null as well. I have also tried cleaning and rebuilding the project multiple times and alas this doesn't work either.
08-31 05:32:19.695 24080-24080/com.ryan.myapp E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.NullPointerException
at com.ryan.myapp.activity.NotificationsActivity$DataAdapter.getView(NotificationsActivity.java:305)
at android.widget.AbsListView.obtainView(AbsListView.java:2604)
at android.widget.ListView.measureHeightOfChildren(ListView.java:1253)
at android.widget.ListView.onMeasure(ListView.java:1165)
at android.view.View.measure(View.java:16515)
at android.widget.RelativeLayout.measureChild(RelativeLayout.java:666)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:477)
at android.view.View.measure(View.java:16515)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5055)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at android.view.View.measure(View.java:16515)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5055)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1435)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:720)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:592)
at android.view.View.measure(View.java:16515)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5055)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2561)
at android.view.View.measure(View.java:16515)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2194)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1339)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1550)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1236)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5160)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:791)
at android.view.Choreographer.doCallbacks(Choreographer.java:591)
at android.view.Choreographer.doFrame(Choreographer.java:561)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:777)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5365)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
the only thing i can think of is that you are not using actually this xml, can you check that? if you have multiple layout folders(for diferent dimensions) check there also
Try to replace :
view = inflater.inflate(R.layout.custom_list_item, null);
by
view = inflater.inflate(R.layout.custom_list_item, parent, false);
And there is no need to do
View view = convertView;
Next step > view holder pattern :)
So everyone thanks for the help! Turns out gmetax from the comments section was right. For some reason it had a different id name from what I gave it. It showed the id's name as date even though I set it to datetext. If anyone could give me an explanation why this happened that would be great so this doesn't happen later in the future. Thanks!
I am having problem with implementing barcodefragmentlibv2 into my project. As a name says and from previous experience I know that I can add it into fragment. However, I am still getting NullPointerException error when I am trying to get this fragment to work with my app.
This is a part of a code responsible for barcode fragment:
import android.support.v4.app.Fragment;
//...
public class CameraFragment extends Fragment implements IScanResultHandler {
BarcodeFragment fragment;
public static CameraFragment newInstance() {
CameraFragment fragment = new CameraFragment();
return fragment;
}
public CameraFragment() {
}
#Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.include_qrfragment, container, false);
fragment = (BarcodeFragment)getActivity().getSupportFragmentManager().findFragmentById(R.id.sample);
fragment.setScanResultHandler(this);
return view;
}
//...
}
Error appears in line:
fragment.setScanResultHandler(this);
I've also tried replacing
getActivity().getSupportFragmentManager().findFragmentById(R.id.sample);
to
getFragmentManager().findFragmentById(R.id.sample);
but the result is this same.
Below are layout files:
fragment_camera
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".CameraFragment">
<include
android:layout_width="match_parent"
android:layout_height="match_parent"
layout="#layout/include_qrfragment" />
<TextView
android:id="#+id/status_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:layout_margin="15dp"
android:background="#99FFFFFF"
android:gravity="center"
android:padding="10dp"
android:text="#string/msg_default_status"
android:textAppearance="?android:attr/textAppearanceMedium" />
<View
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
include_qrfragment
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/sample"
android:name="com.abhi.barcode.frag.libv2.BarcodeFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
At the beginning I've mentioned that from my own experience that this is possible. The truth is that I've built app utilizing this feature some time ago using eclipse and now I am using Android Studio - maybe there is a problem?
EDIT 1:
This is the whole error's stack trace:
06-22 23:05:56.804 30578-30578/myapp.com.test E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.NullPointerException
at myapp.com.test.CameraFragment.onCreateView(CameraFragment.java:34)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1789)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:955)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1138)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:740)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1501)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:458)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
The problem seems to lie in this line:
fragment = (BarcodeFragment)getActivity().getSupportFragmentManager().findFragmentById(R.id.sample);
Your fragment is not yet appended to the activity as getActivity() is null at this point.
Perhaps you should move that particular code to onActivityCreated
You should only inflate the layout at the CreateView, like this:
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
return inflater.inflate(R.layout.your_layout, null);
}
The rest of your code, you should put it in the onActivityCreated as #waqaslam said.
You are getting a null pointer because there is no layout inflated yet.
I have read your responses, and now I am assuming you have tried or moved code of getActivity().getSupportFragmentManager().findFragmentById into onActivityCreated.
The only suspect I see without loading up your project is the GUI ID itself. You named it sample or R.id.sample, which is a suspect in some projects. It is possible that you have another UI element having the same name/ID. If so, that UI cannot be converted to a fragment. My suggestion is to change the name of the ID (with unique name), and use it with findFragmentById().
FIXED
I outsourced the Bluetooth scanning to a separate thread which was a failure. :D Having fixed this the code now works. Thanks for all support!
ORIGINAL QUESTION
I'm having troubles with exchanging dynamically added fragments (I use the support library and my minimal API version is 8 (Android 2.2)). In my XML which can be seen below file I have a FrameLayout which contains the fragment.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
android:paddingBottom="#dimen/activity_vertical_margin"
tools:context=".BluetoothConnectionManager">
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/frmlFragmentContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"/>
<android.support.v7.widget.Toolbar
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="#+id/tbBottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:background="#color/hafnertec"
android:layout_alignParentBottom="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView android:id="#+id/lblMode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/lblMode"
android:layout_centerInParent="true"/>
<ImageButton android:id="#+id/btnRefresh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_action_refresh"
android:layout_alignParentRight="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_alignRight="#id/lblMode"
android:clickable="false"
android:longClickable="false"
android:onClick="updateData"/>
</RelativeLayout>
</android.support.v7.widget.Toolbar>
</RelativeLayout>
For exchanging the fragments i use a SupportFragmentManager. Furthermore, I also instantiate the two fragments in the onCreate() method. In addition, the fragment for discovering Bluetooth devices is added to the frame layout which works fine.
#Override
protected void onCreate(Bundle savedInstanceState)
{
...
// fetch a FragmentManager used for exchanging the fragments
this.fmFragmentExchanger = this.getSupportFragmentManager();
this.btDiscoveryFragment = new BluetoothDiscoveryFragment();
this.btConnectorFragment = new BluetoothConnectorFragment();
if (this.findViewById(R.id.frmlFragmentContainer) != null)
{
this.fmFragmentExchanger.beginTransaction().add(R.id.frmlFragmentContainer, this.btDiscoveryFragment).disallowAddToBackStack().commit();
}
...
}
Moreover, I've taken care that the fragments extend the Fragment class provided by the support library:
import android.support.v4.app.Fragment;
public class BluetoothDiscoveryFragment extends Fragment implements ...
{
// see: https://developer.android.com/training/basics/fragments/creating.html
#Override
public View onCreateView(LayoutInflater inflater, #Nullable ViewGroup container, Nullable Bundle savedInstanceState)
{
return inflater.inflate(R.layout.fragment_connection_bluetooth_device, container, false);
}
Here is my code for exchanging the fragments:
this.fmFragmentExchanger.beginTransaction().replace(R.id.frmlFragmentContainer, this.btConnectorFragment).disallowAddToBackStack().commit();
The class for discovering Bluetooth devices makes use of a BroadcastReceiver which is "connected" with the activity. On stopping the discovery process or when it has finished I unregister this BroadcastReceiver.
However, on exchanging the fragments nothing happens and after some time I get an error caused by SIGABRT:
12-31 15:09:51.621 9790-9795/com.hafnertec.afdbluetooth I/dalvikvm﹕ Wrote stack traces to '/data/anr/traces.txt'
12-31 15:09:53.945 9790-9790/com.hafnertec.afdbluetooth A/libc﹕ Fatal signal 6 (SIGABRT) at 0x000001bd (code=0), thread 9790 (ec.afdbluetooth)
Here you can see the file /data/anr/traces.txt: trace file
I'm running the tests on a Samsung Galaxy S I9000 with Android 4.4.4 (CM SNAPSHOT M12). During the activity's onCreate() method I add the btDiscoveryFragment instance which works fine:
this.fmFragmentExchanger.beginTransaction().add(R.id.frmlFragmentContainer, this.btDiscoveryFragment).disallowAddToBackStack().commit();
Furthermore, adding the instance btConnectorFragment using .add() works. However, it logically causes the btConnectorFragment to be overlayed over the btDiscoveryFragment.
I think you have a typo, causing btDiscoveryFragment to be null:
this.fmFragmentExchanger = this.getSupportFragmentManager();
//add this line
this.btDiscoveryFragment = new BluetoothDiscoveryFragment();
//remove this duplicated line
//this.btConnectorFragment = new BluetoothConnectorFragment();
this.btConnectorFragment = new BluetoothConnectorFragment();
Some users are getting this error.
I use a viewgroup to continuously display a banner add.
I then use child views for the program and switch back and forth between views as the user clicks a button.
I can cause a crash by switching back and forth between child views 6 to 10 times.
Here is the layout for the viewgroup:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:myapp="http://schemas.android.com/apk/res/com.company.programname"
xmlns:app="http://schemas.android.com/apk/res/com.adwhirl"
android:orientation="vertical"
android:background="#color/darkslategrey"
android:id="#+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.adwhirl.AdWhirlLayout
android:id="#+id/adwhirl_layout"
android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="52dp"
/>
</LinearLayout>
Here is the code creating the ViewGroup:
setContentView(R.layout.viewgrouplayout);
llLinLay=(LinearLayout)findViewById(R.id.LinearLayout01);
liInflater=(LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
Here is the main child layout with irrelevent pieces cut out:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="#+id/MainLayout"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button
android:id="#+id/MainShowAllDesiredButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/AnotherButton"
android:layout_toRightOf="#id/AButton"
android:textSize="15sp"
android:text="Show All Desired"
android:onClick="MainDesired"
/>
<ListView
android:id="#+id/ItemTypeList"
android:background="#color/aqua"
android:cacheColorHint="#color/aqua"
android:fastScrollEnabled="true"
android:layout_width="fill_parent"
android:layout_height="160dip"
android:layout_below="#id/SomeItem"
/>
</RelativeLayout>
Here is an example of the code creating a view:
vAllDesired=liInflater.inflate(R.layout.alldesiredlayout,null);
vAllDesired.setId(7);
llLinLay.addView(vAllDesired);
final ListView lvAllDesired = (ListView)findViewById(R.id.AllDesiredList);
laAllDesiredAdapter = new AllDesiredListAdapter(this, alAllDesired);
lvAllCoinsDesired.setAdapter(laAllDesiredAdapter);
ViewGroup.LayoutParams AllDesiredParams = lvAllCoinsDesired.getLayoutParams();
AllDesiredParams.height = AllCoinsDesiredHeight;
lvAllCoinsDesired.setLayoutParams(AllDesiredParams);
FillAllDesiredArray();
Here is an example of the code used to switch between views:
bReturnToMainScreen = (Button) findViewById(R.id.DesiredReturnToMainScreenButton);
bReturnToMainScreen.setOnClickListener(new View.OnClickListener(){
#Override
public void onClick(View V) {
llLinLay.removeView(vAllDesired);
MainWindow();
}
});
Here is the trace from Android Developer website. The line number in the program is not always the same.
java.lang.NullPointerException
at android.webkit.WebView.requestFocus(WebView.java:6113)
at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:1073)
at android.view.ViewGroup.requestFocus(ViewGroup.java:1029)
at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:1073)
at android.view.ViewGroup.requestFocus(ViewGroup.java:1029)
at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:1073)
at android.view.ViewGroup.requestFocus(ViewGroup.java:1029)
at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:1073)
at android.view.ViewGroup.requestFocus(ViewGroup.java:1029)
at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:1073)
at android.view.ViewGroup.requestFocus(ViewGroup.java:1029)
at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:1073)
at android.view.ViewGroup.requestFocus(ViewGroup.java:1032)
at android.view.View.requestFocus(View.java:3559)
at android.view.ViewRoot.clearChildFocus(ViewRoot.java:1586)
at android.view.ViewGroup.clearChildFocus(ViewGroup.java:508)
at android.view.ViewGroup.clearChildFocus(ViewGroup.java:508)
at android.view.ViewGroup.clearChildFocus(ViewGroup.java:508)
at android.view.ViewGroup.clearChildFocus(ViewGroup.java:508)
at android.view.ViewGroup.removeViewInternal(ViewGroup.java:2207)
at android.view.ViewGroup.removeViewInternal(ViewGroup.java:2181)
at android.view.ViewGroup.removeView(ViewGroup.java:2129)
at com.jimbobga.mycoinsus.ProgramName$8.onClick(ProgramName.java:488)
at android.view.View.performClick(View.java:2411)
at android.view.View$PerformClick.run(View.java:8819)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
Just curious, when you're making your calls to findViewById, are they in the OnCreate method or directly where you're inflating the row in the adapter? As it relates to your example here, the findViewById method is only guaranteed to work in the OnCreate method or where the particular row is inflated, so its possible that calling it elsewhere could cause unexpected behavior.
Look at this line:
at com.jimbobga.mycoinsus.ProgramName$8.onClick(ProgramName.java:488)
If this is happening after orientation has changed and views have not been assigned then you have a problem.
I'm experiencing the same issue.
Take a look at this response: Issues With Adwhirl(Admob+Inmobi+..)
Eric from AdMob staff says that it's a problem with the Android framework.
Did you try to surround your OnClick() code with a: try/catch Throwable Exception?