title: Android all child views become unresponsive at same time
body: <p>In my app I have a status bar with about 20 elements (Icons and Text). Each element might get updates around 10 times per second. To make it clean, I used observer and LiveData pattern. Here is an example for simple TextView element:</p>
  <pre><code>public class SimpleTextViewDataBinder {
  private LiveData&lt;TextAndColor&gt; mLiveData;
  private Observer&lt;TextAndColor&gt; observer;
  private AppCompatActivity mActivity;
  
  public SimpleTextViewDataBinder(MutableLiveData&lt;TextAndColor&gt; model, TextView view, AppCompatActivity app) {
      mLiveData = model;
      mActivity = app;
      observer = new Observer&lt;TextAndColor&gt;() {
          @Override
          public void onChanged(TextAndColor headerIconItemCollection) {
              view.setText(model.getValue().text);
              view.setBackgroundColor(mActivity.getColor(model.getValue().color));
          }
      };
      mLiveData.observe(mActivity, observer);
  }
  </code></pre>
  <p>Elements with Icon is little bit more complicated but all of them use same pattern. Everything works fine but randomly the whole container and all elements in it become unresponsive. Even buttons on the same container won't response. Other parts of the app keep working though.</p>
  <p>Profiler shows nothings and nothing on the logs. I am sure I send updates but Observer <code>onChange</code> never get called. I thought maybe there is something wrong with Observer and Live Data so I changed the whole thing to old fashion way of Handler/Post on the main thread. Again everything works (with noticeable worse performance) and it becomes unresponsive much faster!</p>
  <p>With Handler/Post solution I get Log prints where &quot;mHandler.post(...)&quot; is called but runnable never being called! It is like the main thread stops handling all messages for this container.</p>
  <p>Does anyone have any idea?</p>
  <p>This is the way I initialize (and update the view)</p>
  <pre><code>    MutableLiveData&lt;TextAndColor&gt; mStatusValueLiveData = new MutableLiveData&lt;&gt;();
      statusTextView = mContext.findViewById(R.id.status_mode_textview);
      TextAndColor statusValue = new TextAndColor(&quot;----&quot;, R.color.colorPrimary);
      mStatusBinder = new SimpleTextViewDataBinder(mStatusValueLiveData, statusTextView, mContext);
      mStatusValueLiveData.postValue(statusValue);
  </code></pre>
  <p>It might worth to mention, I have one container containing around 15 elements on the main activity and another container defined in a fragment containing around 10 elements. When it becomes unresponsive both containers in the main activity and fragment freezes at the same time. It is all random, sometimes it works for 15 minutes and sometimes only 20 seconds!</p>
  <p>I appreciate any help or ideas to test.</p>