J'ai LinearLayout avec forme fond et WebView à l'intérieur. Comment couper WebView le long de la bordure de la forme?Comment couper les bordures de la mise en page enfant?
Je souhaite que WebView corresponde à la forme et que WebView ne présente aucun angle aigu.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="5dip" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bg_border"
android:orientation="vertical" >
<WebView android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</LinearLayout>
</LinearLayout>
bg_border.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke
android:width="1dp"
android:height="1dp"
android:color="@color/border" />
<corners
android:radius="5dp"
android:bottomRightRadius="5dp"
android:bottomLeftRadius="5dp"
android:topLeftRadius="5dp"
android:topRightRadius="5dp" />
La couleur de la page va changer, donc ce n'est pas mon chemin. Merci pour le commentaire sur "rayon". – Sviatoslav
Je vais choisir le premier. Je pensais qu'il y a un moyen plus simple :) – Sviatoslav