2

Android でビューを部分的に画面外に配置するにはどうすればよいですか?スライドインする必要があるビューは、現時点では RelativeLayout 内に配置されており、レイアウト ファイル全体は次のとおりです。

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <WebView
        android:id="@+id/webViewLink"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"/>
    <WebView
        android:id="@+id/webView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"/>
</RelativeLayout>

2 番目の webview は、部分的に画面の外にある必要があるものです。

4

1 に答える 1

0

android:layout_marginRight="-30dp"@ user1490103 が提案したように使用できます。または、 を使用できますandroid:translationX。このビューをアニメーション化することを計画している場合、翻訳はより理にかなっています。RelativeLayoutで設定することを忘れないでください。android:clipChilren="false"

于 2016-11-16T19:14:25.963 に答える