title: Progressbar on the background of list item
body: <p>I want background of a list item to work like a progress bar.
  For example, like in tTorrent file list:
  <img src="https://puu.sh/6zVlS" alt="enter image description here"></p>
  
  <p>This is how it is done now: I use a relativelayout and two linearlyouts. One has textviews and another has two views which work as progressbar. "Progress" is changed using weight of the views, which is set dynamically in getView method. Then linearlayout with textviews is brought on the front. Here's the code:</p>
  
  <p>Layout:
      
      </p>
  
  <pre><code>&lt;LinearLayout
      android:padding="5dp"
      android:id="@+id/catStatsRowLay"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical" &gt;
  
      &lt;!-- textviews on the front --&gt;
      ...
  &lt;/LinearLayout&gt;
  
  &lt;!-- views which work as progress bar --&gt;
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_alignBottom="@id/catStatsRowLay"
      android:layout_alignLeft="@id/catStatsRowLay"
      android:layout_alignRight="@id/catStatsRowLay"
      android:layout_alignTop="@id/catStatsRowLay"
      android:layout_below="@id/catStatsRowLay"
      android:layoutDirection="rtl"
      android:orientation="horizontal" &gt;
  
      &lt;View
          android:id="@+id/catStatsRowBar"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_weight=".70"
          android:background="#cc550000" /&gt;
  
      &lt;View
          android:id="@+id/catStatsRowBar2"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_weight=".30"
          android:background="@android:color/transparent" /&gt;
  &lt;/LinearLayout&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>And getView method:</p>
  
  <pre><code>public View getView(int position, View convertView, ViewGroup parent) {
          LayoutInflater inflater = (LayoutInflater) context
                  .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  
          View rowView = inflater.inflate(R.layout.categories_stats_list_row,
                  parent, false);
  
          //filling textviews
          ...
  
          //getting bars that work as progressbar
          View bar = (View) rowView.findViewById(R.id.catStatsRowBar);
          View bar2 = (View) rowView.findViewById(R.id.catStatsRowBar2);
          //calculating and setting weights
          float percent = cs.getBarWeight();
          LinearLayout.LayoutParams barPar = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,
                  LayoutParams.MATCH_PARENT, (1-percent));
          LinearLayout.LayoutParams bar2Par = new LinearLayout.LayoutParams(
                  LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, percent);
  
          bar.setLayoutParams(barPar);
          bar2.setLayoutParams(bar2Par);
          bar.setBackgroundColor(cs.getColor(position));
          //bringing LinearLayout with textviews to front
          LinearLayout ll = (LinearLayout) rowView
                  .findViewById(R.id.catStatsRowLay);
          ll.bringToFront();
  
          return rowView;
      }
  </code></pre>
  
  <p>It perfectly works on 4.2.2 and lower devices (screenshot below).</p>
  
  <p><img src="https://puu.sh/6zVlW" alt="enter image description here"></p>
  
  <p>The problem: 4.3 and higher (both emulators and devices) do not show "progress" views. I tried not bringing linearlayout with textviews to the front, setting weights to constants, changing linearlayout's aligments - no result, "progress" views are not shown. How can I make it work on new versions of android?</p>