change visibility of divider to avoid layout issues
This commit is contained in:
1 parent
9bc275d199
commit
d200d45f2d
4 files changed
+7
No files matched your search
@@ -47,6 +47,7 @@ THE SOFTWARE.
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="1dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:visibility="gone"
|
||||
android:background="?divider_color" />
|
||||
<ImageView
|
||||
android:id="@+id/arrow"
|
||||
|
||||
@@ -198,6 +198,7 @@ public class FileSystemAdapter
|
||||
view = mInflater.inflate(R.layout.library_row_expandable, null);
|
||||
holder = new ViewHolder();
|
||||
holder.text = (TextView)view.findViewById(R.id.text);
|
||||
holder.divider = (View)view.findViewById(R.id.divider);
|
||||
holder.arrow = (ImageView)view.findViewById(R.id.arrow);
|
||||
holder.text.setOnClickListener(this);
|
||||
holder.arrow.setOnClickListener(this);
|
||||
@@ -212,6 +213,7 @@ public class FileSystemAdapter
|
||||
holder.id = pos;
|
||||
holder.text.setText(file.getName());
|
||||
holder.arrow.setVisibility(isDirectory ? View.VISIBLE : View.GONE);
|
||||
holder.divider.setVisibility(isDirectory ? View.VISIBLE : View.GONE);
|
||||
holder.text.setCompoundDrawablesWithIntrinsicBounds(isDirectory ? mFolderIcon : null, null, null, null);
|
||||
return view;
|
||||
}
|
||||
|
||||
@@ -462,12 +462,14 @@ public class MediaAdapter
|
||||
view.setTag(holder);
|
||||
|
||||
holder.text = (TextView)view.findViewById(R.id.text);
|
||||
holder.divider = (View)view.findViewById(R.id.divider);
|
||||
holder.arrow = (ImageView)view.findViewById(R.id.arrow);
|
||||
holder.cover = (LazyCoverView)view.findViewById(R.id.cover);
|
||||
holder.arrow.setOnClickListener(this);
|
||||
holder.text.setOnClickListener(this);
|
||||
holder.cover.setOnClickListener(this);
|
||||
|
||||
holder.divider.setVisibility(mExpandable ? View.VISIBLE : View.GONE);
|
||||
holder.arrow.setVisibility(mExpandable ? View.VISIBLE : View.GONE);
|
||||
holder.cover.setVisibility(mCoverCacheType != MediaUtils.TYPE_INVALID ? View.VISIBLE : View.GONE);
|
||||
holder.cover.setup(mLooper);
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
package ch.blinkenlights.android.vanilla;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ImageView;
|
||||
|
||||
@@ -25,6 +26,7 @@ public class ViewHolder {
|
||||
public long id;
|
||||
public String title;
|
||||
public TextView text;
|
||||
public View divider;
|
||||
public ImageView arrow;
|
||||
public LazyCoverView cover;
|
||||
}
|
||||
Reference in new issue
Block a user