Android Open Source - SlidingUpPaneLayout Main Activity






From Project

Back to project page SlidingUpPaneLayout.

License

The source code is released under:

Apache License

If you think the Android project SlidingUpPaneLayout listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.chenjishi.slideupdemo;
/*  w w w.java2  s  . c  o m*/
import android.app.Activity;
import android.os.Bundle;

public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        final float density = getResources().getDisplayMetrics().density;

        SlidingUpPaneLayout slidingUpPaneLayout = (SlidingUpPaneLayout) findViewById(R.id.sliding_up_layout);
        slidingUpPaneLayout.setParallaxDistance((int) (200 * density));
        slidingUpPaneLayout.setShadowResourceTop(R.drawable.shadow_top);

        slidingUpPaneLayout.openPane();
    }
}




Java Source Code List

com.chenjishi.slideupdemo.MainActivity.java
com.chenjishi.slideupdemo.SlidingUpPaneLayout.java