2015-03-02 52 views
-5

我正在尝试使用以下方法开发滤镜。我找不到红色突出显示查看android。我怎样才能做到这一点。在android中找不到视图

enter image description here

任何帮助,将不胜感激。

+0

红色突出显示的视图?你的意思是一个边界?只需使用相对布局并将其设为红色,然后在此相对布局中放置另一个相对布局,并且您的视图进入该布局? – Skynet 2015-03-02 07:55:20

+0

你到目前为止尝试过什么? – Gattsu 2015-03-02 07:55:24

+0

@Skynet我只是突出显示特定区域使用RED行来理解目的 – Amy 2015-03-02 07:57:12

回答

0

检查:

<RelativeLayout 
      android:layout_width="fill_parent" 
      android:layout_height="78dp" 
      android:layout_gravity="center" 
      android:layout_marginTop="0dp" 
      android:background="#CCDEF6" > 

      <RelativeLayout 
       android:layout_width="fill_parent" 
       android:layout_height="70dp" 
       android:background="#FFFFFF" 
       android:layout_centerInParent="true" 
       android:layout_marginRight="4dp" 
       android:layout_marginLeft="4dp" > 

       <Button 
        android:id="@+id/delete" 
        android:layout_width="45dp" 
        android:layout_height="45dp" 
        android:layout_alignParentRight="true" 
        android:layout_centerVertical="true" 
        android:layout_marginRight="05dp" 
        android:background="@drawable/icn_edit_45x45" 
        android:textColor="#FFFFFF" /> 

       <Button 
        android:id="@+id/edit" 
        android:layout_width="45dp" 
        android:layout_height="45dp" 
        android:layout_centerVertical="true" 
        android:layout_marginRight="18dp" 
        android:layout_toLeftOf="@+id/delete" 
        android:background="@drawable/icn_delete_45x45" 
        android:textColor="#FFFFFF" /> 
      </RelativeLayout> 
     </RelativeLayout> 
+0

你让我错了我试图发展观方红场。 – Amy 2015-03-02 08:01:45

+0

请检查上面有你的广场在蓝色,它有内部的意见!这些视图有@ + id/delete和@ + id /编辑为ID – Skynet 2015-03-02 08:03:07

+0

我想要可点击的选项卡,如AC非AC等 – Amy 2015-03-02 08:04:14

0
  1. 让你绘制此xml:
<shape xmlns:android="http://schemas.android.com/apk/res/android" 
    android:shape="rectangle" > 

    <solid android:color="@android:color/transparent" /> 

    <stroke 
     android:width="2dip" 
     android:color="#007f00" /> 

</shape> 
  • 使得在此之后将其设置背景你的布局类型低于布局。
  • 0

    您不需要实施任何自定义视图。

    1)首先将AC-NON_AC布局包含到具有填充eg.5dp的相对布局。

    2)然后设置相对布局#FF0000的背景,即红色。

    如果问题仍然存在,请问我,我会帮你的。

    相关问题