android - android studio 中的预览选项不起作用
问题描述
我在预览选项 [xml] 中的 android studio 中有一些问题
详情如下
我做了所有的事情。
- Gradle 已经构建
- 所有 xml 布局错误均已删除
- 还更改了 api 级别、屏幕分辨率、旋转和主题
- 重启 android studio 但什么也没有发生下面的图片链接
代码如下
<?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>
解决方案
首先在屏幕“!”的右上角向我们展示您的问题 每秒屏幕显示(如果我记得很清楚的话)你的屏幕还没有在我的旧电脑上加载甚至是 2-3 分钟才显示:)
推荐阅读
- android - Android Kotlin:当应用程序处于打盹模式时获取位置
- react-native - 添加商品时如何添加到购物车?
- matlab - 如何在 MATLAB 中为 Newton Raphson 方法编写时找到输入函数的微分
- python - TensorFlow 对象检测 API - CheckpointReader ValueError
- android - 内容不需要横向滚动的Android WebView setInitialScale()
- neural-network - 神经网络中的误差函数定义
- mysql - mysql表不是由wordpress插件创建的
- javascript - 发出 AJAX 请求后出现“错误:期待帖子”
- node.js - 使用heroku进行端点调用
- python - 使用烧瓶重新上传的“RuntimeError:没有设置照片的目的地”