Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

Open slider after changing layout loads. #36

Open
kibagami-jubei opened this issue Aug 10, 2013 · 1 comment
Open

Open slider after changing layout loads. #36

kibagami-jubei opened this issue Aug 10, 2013 · 1 comment

Comments

@kibagami-jubei
Copy link

Hi, I'm trying to have the sliding layer display (shown) over the main layout right after I set the content view. Here's my code.

    setContentView(R.layout.randomLayout);      

    slidingLayer = (SlidingLayer) findViewById(R.id.slidingLayer1);
    slidingLayer.setShadowWidthRes(R.dimen.shadow_width);
    slidingLayer.setShadowDrawable(R.drawable.sidebar_shadow);
    slidingLayer.setStickTo(SlidingLayer.STICK_TO_MIDDLE);
    slidingLayer.setCloseOnTapEnabled(false);
    slidingLayer.openLayer(true);

Okay, here's what most of my layout looks like. Now for some reason, the relative layout ain't showing at all when I post this so just imagine that this content is inside a relative layout.

<com.slidinglayer.SlidingLayer
    xmlns:slidingLayer="http://schemas.android.com/apk/res/com.slidinglayersample"
    android:id="@+id/slidingLayer1"
    android:layout_width="@dimen/layer_width"
    android:layout_height="match_parent" />
<include layout="@layout/user_preferences" />

The code "works" as no errors are thrown. However, the layer isn't showing up either.
Is there a way to open the sliding layer after changing layouts?

@tprill
Copy link

tprill commented Nov 9, 2013

did you try calling bringToFront() on your slidinglayer? maybe its hidden behind some view..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants