android studio中的预览选项不起作用

时间:2018-06-01 07:24:59

标签: android xml android-layout

我在预览选项[xml]

中的android studio中遇到了一些问题

详情如下

我完成了所有事情。

  1. Gradle已构建
  2. 删除所有xml布局错误
  3. 还更改了api级别,屏幕分辨率,旋转和主题
  4. 重启android studio 但不可能发生任何事情
  5. 下方的图片链接

    enter image description here

    代码低于

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
       xmlns:app="http://schemas.android.com/apk/res-auto"
       xmlns:card_view="http://schemas.android.com/tools"
       android:layout_width="match_parent"
       android:layout_height="match_parent">
    
       <android.support.design.widget.CollapsingToolbarLayout
           android:id="@+id/DT_ImageCardView"
           android:layout_width="match_parent"
           android:layout_height="150dp"
           app:cardBackgroundColor="@color/DarkGrayDark"
           app:contentScrim="?attr/colorPrimary"
           app:layout_scrollFlags="scroll|exitUntilCollapsed"
           card_view:cardPreventCornerOverlap="false">
    
           <ImageView
               android:id="@+id/DT_full_image"
               android:layout_width="match_parent"
               android:layout_height="match_parent"
               android:background="@color/colorPrimaryDark"
               android:contentDescription="@string/dailytipsimage"
               android:scaleType="fitXY"
               android:src="@drawable/trans_logo" />
    
           <ImageView
               android:id="@+id/DT_share"
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:layout_below="@id/DT_ImageCardView"
               android:background="@color/transparentBlack"
               android:contentDescription="@string/dailytipsshare"
               android:padding="5dp"
               android:src="@drawable/ic_share_white_24dp" />
    
       </android.support.design.widget.CollapsingToolbarLayout>
    
    
       <TextView
           android:id="@+id/DT_full_title"
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           android:layout_below="@id/DT_ImageCardView"
           android:layout_marginTop="5dp"
           android:text="@string/jeetesh_surana"
           android:textAlignment="center"
           android:textSize="20sp"
           android:textStyle="bold" />
    
       <TextView
           android:id="@+id/DT_full_des"
           android:layout_width="match_parent"
           android:layout_height="wrap_content"
           android:layout_below="@id/DT_full_title"
           android:layout_margin="10dp" />
    
       <android.support.design.widget.FloatingActionButton
           android:id="@+id/DT_full_videoIV"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:layout_alignParentRight="true"
           android:layout_below="@id/DT_full_des"
           android:layout_margin="10dp"
           android:padding="10dp"
           android:src="@drawable/ic_videocam_black_24dp"
           android:visibility="visible" />
    
       <Button
           android:id="@+id/DT_comment"
           android:layout_width="match_parent"
           android:layout_height="50dp"
           android:layout_alignParentBottom="true"
           android:layout_centerHorizontal="true"
           android:background="@color/colorPrimary"
           android:padding="10dp"
           android:text="@string/comment"
           android:textColor="@color/colorWhite" />
    
    </RelativeLayout> 
    

1 个答案:

答案 0 :(得分:-1)

首先在屏幕上向我们展示您的问题“!” 每秒屏幕显示(如果我记得很清楚)你的屏幕尚未加载 在我的旧电脑上甚至是2-3分钟才显示:)

相关问题