How to set specific height at run time for Sliding layout?



I am building an app that uses this library:http://ift.tt/1iF8uYH to create a panel that slides on from the bottom of the screen when a user clicks an item in a listview. However i dont want the slide up panel to take up the entire screen. I need there to be a gap at the top, between the panel and the action bar, of exactly 80dp. I have tried everything i can think of (putting a spacer there with a transparant background, using layoutParams (gives error), etc). But nothing seems to work.


If someone could give me some suggestions as to what i could try next, i would much appreciate it.


The xml layouts are below.


Thanks for your time.


Corey



<com.bacon.corey.audiotimeshift.SlidingUpPanelLayout xmlns:sothree="http://ift.tt/GEGVYd"
xmlns:android="http://ift.tt/nIICcg"
android:id="@+id/sliding_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
sothree:panelHeight="68dp"
sothree:shadowHeight="4dp"
sothree:overlay="true">

<FrameLayout xmlns:android="http://ift.tt/nIICcg"
xmlns:app="http://ift.tt/GEGVYd"
android:orientation="vertical"
android:padding="4dip"
android:gravity="center_horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout xmlns:android="http://ift.tt/nIICcg"
xmlns:app="http://ift.tt/GEGVYd"
android:orientation="vertical"
android:padding="4dip"
android:gravity="center_horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1">

</android.support.v4.view.ViewPager>

</LinearLayout>

<com.bacon.corey.audiotimeshift.FloatingActionButton
android:id="@+id/fabbutton"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_gravity="bottom|right"
android:layout_marginBottom="16dp"
android:layout_marginRight="16dp"
app:colour="@color/holo_red_light"
app:drawable="@drawable/ic_content_new"

/>

</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center|top"
android:textSize="16sp"
android:id="@+id/slideUpPanel"

android:background="@android:color/transparent"
>

<fragment android:name="com.bacon.corey.audiotimeshift.PlayFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/fragment_play"

/>
</FrameLayout>

</com.bacon.corey.audiotimeshift.SlidingUpPanelLayout>

No comments:

Post a Comment