Remove unnecessary LinearLayout
This commit is contained in:
parent
d30361fb8f
commit
411d0e99a8
@ -35,51 +35,43 @@ THE SOFTWARE.
|
||||
android:layout_margin="5dip"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:id="@+id/text"
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:visibility="gone"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0px"
|
||||
android:layout_weight="1"
|
||||
android:layout_margin="5dip"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:visibility="gone"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0px"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_horizontal|bottom"
|
||||
android:textColor="#fff"
|
||||
android:textSize="18dip"
|
||||
android:shadowColor="#f000"
|
||||
android:shadowDx="0"
|
||||
android:shadowDy="0"
|
||||
android:shadowRadius="5"
|
||||
android:textStyle="bold"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true" />
|
||||
<TextView
|
||||
android:id="@+id/artist"
|
||||
android:text="@string/app_name"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0px"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_horizontal|top"
|
||||
android:textColor="#fff"
|
||||
android:shadowColor="#f000"
|
||||
android:shadowDx="0"
|
||||
android:shadowDy="0"
|
||||
android:shadowRadius="5"
|
||||
android:textSize="15dip"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true" />
|
||||
</LinearLayout>
|
||||
android:gravity="center_horizontal|bottom"
|
||||
android:textColor="#fff"
|
||||
android:textSize="18dip"
|
||||
android:shadowColor="#f000"
|
||||
android:shadowDx="0"
|
||||
android:shadowDy="0"
|
||||
android:shadowRadius="5"
|
||||
android:textStyle="bold"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true" />
|
||||
<TextView
|
||||
android:id="@+id/artist"
|
||||
android:text="@string/app_name"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0px"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_horizontal|top"
|
||||
android:textColor="#fff"
|
||||
android:shadowColor="#f000"
|
||||
android:shadowDx="0"
|
||||
android:shadowDy="0"
|
||||
android:shadowRadius="5"
|
||||
android:textSize="15dip"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true" />
|
||||
<LinearLayout
|
||||
android:id="@+id/buttons"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0px"
|
||||
android:layout_weight="1">
|
||||
android:layout_weight="2">
|
||||
<ImageButton
|
||||
android:id="@+id/play_pause"
|
||||
android:adjustViewBounds="true"
|
||||
|
@ -98,7 +98,7 @@ public class FourSquareWidget extends AppWidgetProvider {
|
||||
views.setViewVisibility(R.id.cover, View.GONE);
|
||||
} else if (song == null) {
|
||||
views.setViewVisibility(R.id.buttons, View.VISIBLE);
|
||||
views.setViewVisibility(R.id.title, View.GONE);
|
||||
views.setViewVisibility(R.id.title, View.INVISIBLE);
|
||||
views.setInt(R.id.artist, "setText", R.string.app_name);
|
||||
views.setViewVisibility(R.id.cover, View.GONE);
|
||||
} else {
|
||||
@ -126,7 +126,8 @@ public class FourSquareWidget extends AppWidgetProvider {
|
||||
intent = new Intent(context, LibraryActivity.class);
|
||||
intent.setAction(Intent.ACTION_MAIN);
|
||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);
|
||||
views.setOnClickPendingIntent(R.id.text, pendingIntent);
|
||||
views.setOnClickPendingIntent(R.id.title, pendingIntent);
|
||||
views.setOnClickPendingIntent(R.id.artist, pendingIntent);
|
||||
|
||||
intent = new Intent(PlaybackService.ACTION_TOGGLE_PLAYBACK).setComponent(service);
|
||||
pendingIntent = PendingIntent.getService(context, 0, intent, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user