title: LinearLayout not showing up on specific devices
body: <p><strong>Some Context:</strong></p>
  
  <p>Something kind of spooky is happening to an app of mine.  I have a <code>LinearLayout</code> with two <code>ToggleButtons</code> inside.  I'm testing it on an LG G4 running Android 6.0 (previously 5.1 which was also functional) and both buttons show up no problem.  I encountered this issue when I built a signed APK and installed it on a Samsung Galaxy S6 running 5.1.1.  On this device, and so far this device alone, the <code>LinearLayout</code> is not showing up!</p>
  
  <p><strong>I've tried:</strong></p>
  
  <ul>
  <li>Hard-coding the layout and button's visibility in the activity's <code>onCreate</code> method</li>
  <li>Hard-coding the layout and button's visibility in the activity's layout xml</li>
  <li>Replacing the <code>LinearLayout</code> with a <code>RelativeLayout</code></li>
  <li>Searching and subsequently Googling/SO searching for basically every line of relevant output</li>
  </ul>
  
  <p><strong>Logcat logs</strong></p>
  
  <p>Here's a <strong>bad log</strong> from the Samsung S6 beginning as soon as I press the button to take me to the offending activity where the layout does not show up:</p>
  
  <pre><code>02-15 10:56:15.799 20301-20301/com.MyApp.android D/ViewRootImpl: ViewPostImeInputStage ACTION_DOWN
  02-15 10:56:15.959 20301-20301/com.MyApp.android I/Timeline: Timeline: Activity_launch_request id:com.MyApp.android time:49138619
  02-15 10:56:15.999 20301-20301/com.MyApp.android D/PhoneWindow: *FMB* installDecor mIsFloating : false
  02-15 10:56:15.999 20301-20301/com.MyApp.android D/PhoneWindow: *FMB* installDecor flags : 8454400
  02-15 10:56:16.019 20301-20301/com.MyApp.android D/AbsListView: Get MotionRecognitionManager
  02-15 10:56:16.019 20301-20301/com.MyApp.android D/lantern: bind - activity: false  connected: false
  02-15 10:56:16.029 20301-20301/com.MyApp.android D/Activity: performCreate Call Injection manager
  02-15 10:56:16.029 20301-20301/com.MyApp.android I/InjectionManager: dispatchOnViewCreated &gt; Target : com.MyApp.android.activities.ResultsActivity isFragment :false
  02-15 10:56:16.039 20301-20301/com.MyApp.android D/SecWifiDisplayUtil: Metadata value : SecSettings2
  02-15 10:56:16.049 20301-20301/com.MyApp.android D/PhoneWindow: *FMB* isFloatingMenuEnabled mFloatingMenuBtn : null
  02-15 10:56:16.049 20301-20301/com.MyApp.android D/PhoneWindow: *FMB* isFloatingMenuEnabled return false
  02-15 10:56:16.069 20301-20301/com.MyApp.android D/SRIB_DCS: log_dcs ThreadedRenderer::initialize entered! 
  02-15 10:56:16.069 20301-20351/com.MyApp.android D/mali_winsys: new_window_surface returns 0x3000,  [1440x2560]-format:1
  02-15 10:56:16.089 20301-20301/com.MyApp.android D/lantern: onConnected - activity: true
  02-15 10:56:16.089 20301-20301/com.MyApp.android D/lantern: onConnected - location: null
  02-15 10:56:16.109 20301-20438/com.MyApp.android I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
  02-15 10:56:16.109 20301-20438/com.MyApp.android I/System.out: (HTTPLog)-Static: isShipBuild true
  02-15 10:56:16.109 20301-20438/com.MyApp.android I/System.out: (HTTPLog)-Thread-33529-429041145: SmartBonding Enabling is false, SHIP_BUILD is true, log to file is false, DBG is false
  02-15 10:56:16.109 20301-20438/com.MyApp.android I/System.out: (HTTPLog)-Thread-33529-429041145: SMARTBONDING_FEATURE_ENABLED is true
  02-15 10:56:16.109 20301-20438/com.MyApp.android I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
  02-15 10:56:16.109 20301-20438/com.MyApp.android I/System.out: KnoxVpnUidStorageknoxVpnSupported API value returned is false
  02-15 10:56:16.109 20301-20438/com.MyApp.android I/System.out: KnoxVpnUidStorageknoxVpnSupported API value returned is false
  02-15 10:56:16.129 20301-20301/com.MyApp.android I/InjectionManager: dispatchCreateOptionsMenu :com.MyApp.android.activities.ResultsActivity
  02-15 10:56:16.129 20301-20301/com.MyApp.android I/InjectionManager: dispatchPrepareOptionsMenu :com.MyApp.android.activities.ResultsActivity
  02-15 10:56:16.129 20301-20301/com.MyApp.android I/InjectionManager: dispatchPrepareOptionsMenu :com.MyApp.android.activities.ResultsActivity
  02-15 10:56:16.179 20301-20301/com.MyApp.android I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@1f360f65 time:49138846
  02-15 10:56:18.579 20301-20301/com.MyApp.android D/ListView: change accessibility focus position = 0
  02-15 10:56:26.089 20301-20443/com.MyApp.android D/lantern: Timer has run. Connected: true
  02-15 10:56:26.099 20301-20301/com.MyApp.android D/lantern: Remove timer tasks
  02-15 10:56:26.099 20301-20301/com.MyApp.android D/lantern: Request balanced location updates
  02-15 10:56:46.549 20301-20301/com.MyApp.android V/ActivityThread: updateVisibility : ActivityRecord{35b69275 token=android.os.BinderProxy@1f360f65 {com.MyApp.android/com.MyApp.android.activities.ResultsActivity}} show : true
  </code></pre>
  
  <p>And here's a <strong>good log</strong> from my G4, a device where the layout does show up:</p>
  
  <pre><code>02-15 10:44:36.382 5966-5966/com.MyApp.android I/ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
  02-15 10:44:36.405 5966-5966/com.MyApp.android I/ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
  02-15 10:44:36.409 5966-5966/com.MyApp.android I/AudioManagerEx: AudioManagerEx created
  02-15 10:44:36.419 5966-5966/com.MyApp.android I/Timeline: Timeline: Activity_launch_request id:com.MyApp.android time:102565694
  02-15 10:44:36.472 5966-5966/com.MyApp.android W/SplitWindow: update focus... 
  02-15 10:44:36.500 5966-5966/com.MyApp.android D/PhoneWindowEx: Ex2. SystemProperties.get result &gt;&gt; #ff000000
  02-15 10:44:36.657 5966-5966/com.MyApp.android D/lantern: bind - activity: false    connected: false
  02-15 10:44:36.711 5966-5966/com.MyApp.android D/lantern: onConnected - activity: true
  02-15 10:44:36.739 5966-6082/com.MyApp.android W/art: Failed to open zip archive '/system/framework/qcom.fmradio.jar': I/O Error
  02-15 10:44:36.739 5966-6082/com.MyApp.android W/art: Failed to open zip archive '/system/framework/oem-services.jar': I/O Error
  02-15 10:44:36.758 5966-6082/com.MyApp.android D/libc: getaddrinfo called from pid =5966
  02-15 10:44:36.758 5966-6082/com.MyApp.android D/libc: getaddrinfo called from pid =5966
  02-15 10:44:36.782 5966-5966/com.MyApp.android D/lantern: onConnected - location: (33.7568342,-84.3645554) within 169.086 meters
  02-15 10:44:36.842 5966-5966/com.MyApp.android W/SplitWindow: update focus... 
  02-15 10:44:36.844 5966-5966/com.MyApp.android D/Editor: setInputTypeforClipTray(): 0
  02-15 10:44:36.874 5966-5966/com.MyApp.android V/ViewRootImpl: Contents drawing finished : com.MyApp.android/com.MyApp.android.activities.ResultsActivity
  02-15 10:44:36.914 5966-5966/com.MyApp.android E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
  02-15 10:44:36.914 5966-5966/com.MyApp.android E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
  02-15 10:44:36.915 5966-5966/com.MyApp.android I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@64a0c0d time:102566189
  02-15 10:44:36.924 5966-6082/com.MyApp.android D/libc: getaddrinfo called from pid =5966
  </code></pre>
  
  <p><strong>Code</strong></p>
  
  <p>Here is the layout from the activity's <strong>XML</strong></p>
  
  <pre><code>&lt;LinearLayout
          android:orientation="horizontal"
          android:layout_width="fill_parent"
          android:layout_height="50dp"
          android:background="@color/white"
          android:layout_below="@+id/imgStation"
          android:layout_alignParentLeft="true"
          android:layout_alignParentStart="false"
          android:id="@+id/layout_sort_options"
          android:visibility="visible"&gt;
  
          &lt;ToggleButton
              android:layout_width="fill_parent"
              android:layout_height="match_parent"
              android:text="@string/name"
              android:id="@+id/btnSortName"
              android:layout_weight="1"
              style="@style/Button.Sort"
              android:checked="true"
              android:textOff="Name"
              android:textOn="Name"
              android:onClick="pressedSortName"
              android:clickable="true"
              android:visibility="visible" /&gt;
  
          &lt;ToggleButton
              android:layout_width="fill_parent"
              android:layout_height="match_parent"
              android:text="@string/distance"
              android:id="@+id/btnSortDistance"
              android:layout_weight="1"
              style="@style/Button.Sort"
              android:checked="true"
              android:textOff="Distance"
              android:textOn="Distance"
              android:onClick="pressedSortDistance"
              android:clickable="true"
              android:visibility="visible" /&gt;
  
      &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>And here's the activity's <strong><code>onCreate()</code></strong> method looks more or less like this:</p>
  
  <pre><code>public class myActivity {
      private LinearLayout m_layout_sort_options;
      private ToggleButton m_btnSortName;
      private ToggleButton m_btnSortDistance;
  
      protected void onCreate(Bundle savedInstanceState){
          super.onCreate(savedInstanceState);
  
      m_layout_sort_options = (LinearLayout)findViewById(R.id.layout_sort_options);
      m_btnSortName = (ToggleButton)findViewById(R.id.btnSortName);
      m_btnSortDistance = (ToggleButton)findViewById(R.id.btnSortDistance);
  
      //here is the hard-coding which attempts to default the visibility of the buttons and layout
      m_btnSortDistance.setVisibility(View.VISIBLE);
      m_btnSortDistance.setVisibility(View.VISIBLE);
      m_layout_sort_options.setVisibility(View.VISIBLE);
  
      }
  }
  </code></pre>
  
  <p><strong>The plight</strong></p>
  
  <p>So all I can really tell is that the layout, despite what kind it is, is not showing up on the Samsung Galaxy S6, but that it shows up just fine on my other devices.  I've seen a few other posts here on SO about this, but the answers don't seem to apply to my situation.  If anyone has encountered a problem like this, please post any information you can recall!</p>