2017-02-01 6 views
1

画像ビューをレイアウトに配置して、一部が同じレイアウトで表示され、残りがその外側に表示されるようにしたい他のレイアウトよりも優先されます。このアプリで一部の部分が同じレイアウトでレイアウト外にあるレイアウトでイメージビューを設定する方法

<com.sothree.slidinguppanel.SlidingUpPanelLayout 
xmlns:sothree="http://schemas.android.com/apk/res-auto" 
xmlns:android="http://schemas.android.com/apk/res/android" 
android:id="@+id/sliding_layout" 
android:layout_width="match_parent" 
android:layout_height="wrap_content" 
android:gravity="top" 
sothree:umanoFadeColor="@android:color/transparent" 
sothree:umanoPanelHeight="0dp" 
sothree:umanoShadowHeight="0dp"> 

<LinearLayout 
android:layout_width="match_parent" 
android:background="#c4fff8" 
android:layout_height="match_parent"> 

</LinearLayout> 
<LinearLayout 
android:layout_width="match_parent" 
android:layout_height="300dp" 
android:background="#ffd8b1" 
android:orientation="vertical"> 

<LinearLayout 
android:orientation="vertical" 
android:layout_width="match_parent" 
android:background="@drawable/edittext_layout" 
android:layout_height="250dp"> 

</LinearLayout> 

<RelativeLayout 
android:layout_width="match_parent" 
android:layout_height="match_parent"> 

<ImageView 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:background="@drawable/cat1" 
android:layout_marginRight="46dp" 
android:layout_marginEnd="46dp" 
android:layout_marginBottom="-20dp" 
android:id="@+id/imageView6" 
android:layout_alignParentBottom="true" 
android:layout_alignParentRight="true" 
android:layout_alignParentEnd="true" /> 
</RelativeLayout> 

</LinearLayout> 
</com.sothree.slidinguppanel.SlidingUpPanelLayout> 

のEditTextレイアウト

<?xml version="1.0" encoding="utf-8"?> 
<shape xmlns:android="http://schemas.android.com/apk/res/android" 
android:padding="10dp" 
android:shape="rectangle" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content"> 
<stroke android:color="#050505" 
android:width="1dp"></stroke> 
<solid android:color="#80a7a7a7"/> 
</shape> 

メイン

活動は、私は、通知プルダウンのようなレイアウトをプルダウンしたいとレイアウトのイメージがあるでしょうこれはメイン画面レイアウトで半分に見えるか、メインレイアウト上にあり、残りは親レイアウトにあると言えるでしょう。どのように私はこのようなイメージを設定することができます、guyzは私を助けます。

は、私は、このようにこの依存関係でレイアウト配置をしたい、依存関係がGitHubのから取られてい

dependencies { 
repositories { 
mavenCentral() 
} 
compile 'com.sothree.slidinguppanel:library:3.3.1' 
} 

ライブラリをインポートする前にhttps://github.com/umano/AndroidSlidingUpPanel

screenshot is here

をありがとうございましたframelayoutは機能しません。

+0

スクリーンショットを追加して、あなたの必要性を正確に把握できますか? – Piyush

+0

あなたは2つの親レイアウトを持つイメージビューを持っていません – Knattic

+0

スクリーンショットをアップロードしました –

答えて

0

2つのレイアウトに実際にビューを配置することはできません。 imageViewを2つのレイアウトの上にあるかのように見せたいだけなら、FrameLayoutを使って、それらのレイアウト上にイメージビューを配置することができます。

しかし、2つの親レイアウトで表示する方法はありません。

+0

この依存関係でフレームレイアウトを使用することはできません。試してみてください。ここにコードを投稿してください。 –

関連する問題