From 73b0497234ade5fd061b6d226737a27c8ac5bf61 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Sat, 17 Jan 2015 15:34:27 -0800 Subject: Increase the number of description lines on tablets --- src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/github') diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index d13d9fa5..6d94327c 100644 --- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -1385,7 +1385,8 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter } artistView.setText(spanned); artistView.setSingleLine(false); - artistView.setLines(5); + final int minLines = context.getResources().getInteger(R.integer.TextDescriptionLength); + artistView.setLines(minLines); artistView.setTextAppearance(context, android.R.style.TextAppearance_Small); final Spanned spannedText = spanned; @@ -1393,7 +1394,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter @TargetApi(Build.VERSION_CODES.JELLY_BEAN) @Override public void onClick(View v) { - if(artistView.getMaxLines() == 5) { + if(artistView.getMaxLines() == minLines) { // Use LeadingMarginSpan2 to try to make text flow around image Display display = context.getWindowManager().getDefaultDisplay(); View coverArtView = header.findViewById(R.id.select_album_art); @@ -1424,7 +1425,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter vlp = (ViewGroup.MarginLayoutParams) titleView.getLayoutParams(); vlp.leftMargin = width; } else { - artistView.setMaxLines(5); + artistView.setMaxLines(minLines); if(albumList instanceof HeaderGridView) { HeaderGridView headerGridView = (HeaderGridView) albumList; -- cgit v1.2.3