mohibsheth / panoramagl-android

Automatically exported from code.google.com/p/panoramagl-android
0 stars 0 forks source link

How to display panoramic view in a limited space #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

I was just wondering whether I can display panoramic view in a layout of width 
and hieght 200dip, if so then how to go for it.

Thanks

Original issue reported on code.google.com by ishank.k...@gmail.com on 25 Sep 2012 at 6:51

GoogleCodeExporter commented 9 years ago
I also wanted to know about it...I am trying but with no success

Original comment by udaanpar...@gmail.com on 3 Dec 2012 at 6:13

GoogleCodeExporter commented 9 years ago
To do that I use a fragment in a specified area and return the surfaceView in 
onCreateView ...
like this for example : 

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
        /*imageFace = PLImage.imageWithBitmap(PLUtils.getBitmap(getActivity(), R.raw.chambre04_0));
        imageDroite = PLImage.imageWithBitmap(PLUtils.getBitmap(getActivity(), R.raw.chambre04_1));
        imageRetour = PLImage.imageWithBitmap(PLUtils.getBitmap(getActivity(), R.raw.chambre04_2));
        imageGauche =PLImage.imageWithBitmap(PLUtils.getBitmap(getActivity(), R.raw.chambre04_3));
        imageHaut = PLImage.imageWithBitmap(PLUtils.getBitmap(getActivity(), R.raw.chambre04_4));
        imageBas = PLImage.imageWithBitmap(PLUtils.getBitmap(getActivity(), R.raw.chambre04_5));*/

        panorama2 = new PLCubicPanorama();

        imageFace = PLImage.imageWithBitmap(PLUtils.getBitmap(getActivity(), R.raw.chambre03_01));
        imageDroite = PLImage.imageWithBitmap(PLUtils.getBitmap(getActivity(), R.raw.chambre03_1));
        imageRetour = PLImage.imageWithBitmap(PLUtils.getBitmap(getActivity(), R.raw.chambre03_2));
        imageGauche =PLImage.imageWithBitmap(PLUtils.getBitmap(getActivity(), R.raw.chambre03_3));
        imageHaut = PLImage.imageWithBitmap(PLUtils.getBitmap(getActivity(), R.raw.chambre03_4));
        imageBas = PLImage.imageWithBitmap(PLUtils.getBitmap(getActivity(), R.raw.chambre03_5));

        PLCubeFaceOrientation faceFace = PLCubeFaceOrientation.PLCubeFaceOrientationFront;
        PLCubeFaceOrientation faceDroite = PLCubeFaceOrientation.PLCubeFaceOrientationRight;
        PLCubeFaceOrientation faceRetour = PLCubeFaceOrientation.PLCubeFaceOrientationBack;
        PLCubeFaceOrientation faceGauche = PLCubeFaceOrientation.PLCubeFaceOrientationLeft;
        PLCubeFaceOrientation faceHaut = PLCubeFaceOrientation.PLCubeFaceOrientationUp;
        PLCubeFaceOrientation faceBas = PLCubeFaceOrientation.PLCubeFaceOrientationDown;

        panorama2.setImage(mainActivity.getCurrentGL(), imageFace , faceFace );
        panorama2.setImage(mainActivity.getCurrentGL(), imageDroite  , faceDroite );
        panorama2.setImage(mainActivity.getCurrentGL(), imageRetour , faceRetour );
        panorama2.setImage(mainActivity.getCurrentGL(), imageGauche, faceGauche );
        panorama2.setImage(mainActivity.getCurrentGL(), imageHaut , faceHaut );
        panorama2.setImage(mainActivity.getCurrentGL(), imageBas , faceBas );

        mainActivity.createPanorama(panorama2);
                return mainActivity.surfaceView;
    }

Original comment by bounouar...@gmail.com on 1 Jul 2013 at 9:52

Attachments:

GoogleCodeExporter commented 9 years ago
Please use the last version PanoramaGL 0.2 beta, you can use 
onContentViewCreated methods in PLView class to customize the content layout, 
please check HelloPanoramaGL example.

Original comment by javbae...@gmail.com on 11 Sep 2013 at 11:52

GoogleCodeExporter commented 9 years ago
Please could you help me? Where does the mainActivity?

Tanks

Original comment by rodrigo....@gmail.com on 21 Jan 2014 at 1:05