小编imm*_*odi的帖子

我想在android中将按钮(子视图)带到前面

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout 
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/topHeader"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content" >


      <!-- Header aligned to top -->
    <!--   <include layout="@layout/header_layout" /> -->

      <!-- Footer aligned to bottom -->
    <!--   <include layout="@layout/footer_layout" /> -->

      <!-- Content below header and above footer -->
    <!--   <include layout="@layout/intermediate_layout" /> -->
      <RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:gravity="center">

        <ImageView
        android:id="@+id/imgLogo"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:src="@drawable/header" />
      </RelativeLayout>

    </RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

我制作布局xml,其中我将一个按钮放在中心.我希望该按钮始终在前面.我在这个布局上动态添加了一些textview,imageview等,并且应该将一个中心按钮带到前面.这在ios中是可能的,我想在android.Any建议这个想法?我上面有topHeaderlayout.xml 在这个xml中,我动态添加了view.And按钮应该在视图的前面.

android android-layout

7
推荐指数
1
解决办法
3万
查看次数

如何在iOS中的WebView(react-native-webview)中设置自定义字体?

我想在 Webview 中设置自定义字体。我已经实现了以下代码:

@font-face {
    font-family: 'Poppins-Bold'; 
    src:url('file:///android_asset/fonts/Poppins-Bold.ttf') format('truetype')
}
body{
    font-family: Poppins-Bold
    margin: 0;
    padding: 0;
    color: red;
}
Run Code Online (Sandbox Code Playgroud)

它在 android 中运行良好,但在 iOS 中不起作用。如果有人有解决方案,请告诉我。

注意:我不想使用谷歌的CSS字体

ios react-native react-native-webview

5
推荐指数
1
解决办法
6609
查看次数