80,351
社区成员
发帖
与我相关
我的任务
分享
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:gravity="center_vertical"
android:id="@id/memory_container"
android:padding="20.0dip"
android:layout_width="200.0dip"
android:layout_height="200.0dip"
android:layout_marginLeft="900.0dip"
android:layout_marginTop="300.0dip"
android:scaleType="fitXY"
android:layout_alignParentLeft="true"
xmlns:android="http://schemas.android.com/apk/res/android"
>
<TextView
android:textSize="25.0sp"
android:textColor="@color/white"
android:gravity="center"
android:id="@id/memory_used"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/memory_used_empty"
/>
<ImageView
android:id="@id/memory_circle"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/memory_circle_image"
/>
</RelativeLayout>
<include layout="@layout/layout_memory" />
<com.amlogic.mediaboxlauncher.MyRelativeLayout
android:id="@+id/layout_memory"
android:layout_width="247dp"
android:layout_height="220dp"
android:layout_marginTop="40dp"
android:layout_marginLeft="760dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:descendantFocusability="afterDescendants"
>
<ImageView
android:id="@id/img_memory"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/img_memory"
android:layout_centerInParent="true"
/>
<TextView
android:textSize="30dp"
android:id="@id/tx_memory"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="160.0dip"
android:text="@string/str_memory"
android:layout_centerHorizontal="true"
/>
</com.amlogic.mediaboxlauncher.MyRelativeLayout>
[/quote]
选中后,是下面变大,那前面还要显示不?
不显示就隐了,显示,就在变大后,再把include的布局bringtofront一下看看,不知道你的操作和最张效果要怎么样,总是,肯定是可以实现的。[/quote]
我想要做的效果是layout_memory.xml一直都显示在最上层,不管是选中状态还是没选中状态[/quote]
已经解决了,是在另外一个XML文件进行include引用,哈哈
<com.amlogic.mediaboxlauncher.MyRelativeLayout
android:id="@+id/layout_memory"
android:layout_width="247dp"
android:layout_height="220dp"
android:layout_marginTop="40dp"
android:layout_marginLeft="760dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:descendantFocusability="afterDescendants"
>
<ImageView
android:id="@id/img_memory"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/img_memory"
android:layout_centerInParent="true"
/>
<TextView
android:textSize="30dp"
android:id="@id/tx_memory"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="160.0dip"
android:text="@string/str_memory"
android:layout_centerHorizontal="true"
/>
</com.amlogic.mediaboxlauncher.MyRelativeLayout>
[/quote]
选中后,是下面变大,那前面还要显示不?
不显示就隐了,显示,就在变大后,再把include的布局bringtofront一下看看,不知道你的操作和最张效果要怎么样,总是,肯定是可以实现的。[/quote]
总之,很感谢你对我的帮助
<com.amlogic.mediaboxlauncher.MyRelativeLayout
android:id="@+id/layout_memory"
android:layout_width="247dp"
android:layout_height="220dp"
android:layout_marginTop="40dp"
android:layout_marginLeft="760dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:descendantFocusability="afterDescendants"
>
<ImageView
android:id="@id/img_memory"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/img_memory"
android:layout_centerInParent="true"
/>
<TextView
android:textSize="30dp"
android:id="@id/tx_memory"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="160.0dip"
android:text="@string/str_memory"
android:layout_centerHorizontal="true"
/>
</com.amlogic.mediaboxlauncher.MyRelativeLayout>
[/quote]
选中后,是下面变大,那前面还要显示不?
不显示就隐了,显示,就在变大后,再把include的布局bringtofront一下看看,不知道你的操作和最张效果要怎么样,总是,肯定是可以实现的。[/quote]
我想要做的效果是layout_memory.xml一直都显示在最上层,不管是选中状态还是没选中状态
<com.amlogic.mediaboxlauncher.MyRelativeLayout
android:id="@+id/layout_memory"
android:layout_width="247dp"
android:layout_height="220dp"
android:layout_marginTop="40dp"
android:layout_marginLeft="760dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:descendantFocusability="afterDescendants"
>
<ImageView
android:id="@id/img_memory"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/img_memory"
android:layout_centerInParent="true"
/>
<TextView
android:textSize="30dp"
android:id="@id/tx_memory"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="160.0dip"
android:text="@string/str_memory"
android:layout_centerHorizontal="true"
/>
</com.amlogic.mediaboxlauncher.MyRelativeLayout>
[/quote]
选中后,是下面变大,那前面还要显示不?
不显示就隐了,显示,就在变大后,再把include的布局bringtofront一下看看,不知道你的操作和最张效果要怎么样,总是,肯定是可以实现的。
<com.amlogic.mediaboxlauncher.MyRelativeLayout
android:id="@+id/layout_memory"
android:layout_width="247dp"
android:layout_height="220dp"
android:layout_marginTop="40dp"
android:layout_marginLeft="760dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:descendantFocusability="afterDescendants"
>
<ImageView
android:id="@id/img_memory"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/img_memory"
android:layout_centerInParent="true"
/>
<TextView
android:textSize="30dp"
android:id="@id/tx_memory"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="160.0dip"
android:text="@string/str_memory"
android:layout_centerHorizontal="true"
/>
</com.amlogic.mediaboxlauncher.MyRelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_rect_group"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/layout_up"
android:layout_width="1047dp"
android:layout_height="300dp"
android:layout_marginTop="56dp"
android:layout_centerHorizontal="true"
>
<com.amlogic.mediaboxlauncher.MyRelativeLayout
android:id="@+id/layout_setting"
android:layout_width="297dp"
android:layout_height="220dp"
android:layout_marginTop="40dp"
android:layout_marginLeft="710dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:descendantFocusability="beforeDescendants"
>
<ImageView
android:id="@+id/img_setting"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/img_setting"
android:layout_centerInParent="true"
/>
<TextView
android:id="@+id/tx_setting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="155dp"
android:layout_centerHorizontal="true"
android:text="@string/str_setting"
android:textSize="30dp"
/>
</com.amlogic.mediaboxlauncher.MyRelativeLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="1047dp"
android:layout_height="300dp"
android:layout_marginTop="276dp"
android:layout_centerHorizontal="true"
android:id="@+id/layout_down"
>
<com.amlogic.mediaboxlauncher.MyRelativeLayout
android:id="@+id/layout_memory"
android:layout_width="247dp"
android:layout_height="220dp"
android:layout_marginTop="40dp"
android:layout_marginLeft="760dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:descendantFocusability="afterDescendants"
>
<ImageView
android:id="@id/img_memory"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/img_memory"
android:layout_centerInParent="true"
/>
<TextView
android:textSize="30dp"
android:id="@id/tx_memory"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="160.0dip"
android:text="@string/str_memory"
android:layout_centerHorizontal="true"
/>
</com.amlogic.mediaboxlauncher.MyRelativeLayout>
</RelativeLayout>
<include
layout="@layout/layout_memory"
/>
</RelativeLayout>