Anyone have a clue?  I'm guessing it has something to do with changes
in Donut related to buffering or optimizing display of Z-Order of
views in relative layout, but maybe it's something simpler...

I'm stacking:

LinearLayout
   RelativeLayout
      VideoView  (WRAP_CONTENT, WRAP_CONTENT, CENTER_IN_PARENT)
      ProgressBar (WRAP_CONTENT, WRAP_CONTENT, CENTER_IN_PARENT)
      TextView (WRAP_CONTENT, WRAP_CONTENT, BELOW(my progress bar))

I was counting on relative layout displaying the progress bar and the
text view on top of the video view because they were added to the
layout after the video view.  That worked in 1.5, but stopped since
1.6.


On Nov 2, 11:36 pm, dadical <[email protected]> wrote:
> The following code used to render an indeterminate progress bar with a
> message below, all on top of a video view.  Once the video was ready,
> the message and the progress bar would be made invisible.  Ever since
> cupcake, the progress bar doesn't show at all.  Anyone have any clues?
>
> dk
>
>         private void setupView() {
>                 LinearLayout lLinLayout = new LinearLayout(this);
>             lLinLayout.setId(1);
>             lLinLayout.setOrientation(LinearLayout.VERTICAL);
>             lLinLayout.setGravity(Gravity.CENTER);
>             lLinLayout.setBackgroundColor(Color.BLACK);
>
>             LayoutParams lLinLayoutParms = new LayoutParams
> (ViewGroup.LayoutParams.FILL_PARENT,
> ViewGroup.LayoutParams.FILL_PARENT);
>             lLinLayout.setLayoutParams(lLinLayoutParms);
>
>             this.setContentView(lLinLayout);
>
>             RelativeLayout lRelLayout = new RelativeLayout(this);
>             lRelLayout.setId(2);
>             lRelLayout.setGravity(Gravity.CENTER);
>             lRelLayout.setBackgroundColor(Color.BLACK);
>             android.widget.RelativeLayout.LayoutParams lRelLayoutParms = new
> android.widget.RelativeLayout.LayoutParams
> (ViewGroup.LayoutParams.FILL_PARENT,
> ViewGroup.LayoutParams.FILL_PARENT);
>             lRelLayout.setLayoutParams(lRelLayoutParms);
>             lLinLayout.addView(lRelLayout);
>
>             mVideoView = new VideoView(this);
>             mVideoView.setId(3);
>             android.widget.RelativeLayout.LayoutParams lVidViewLayoutParams =
> new android.widget.RelativeLayout.LayoutParams
> (ViewGroup.LayoutParams.WRAP_CONTENT,
> ViewGroup.LayoutParams.WRAP_CONTENT);
>             lVidViewLayoutParams.addRule(RelativeLayout.CENTER_IN_PARENT);
>             mVideoView.setLayoutParams(lVidViewLayoutParams);
>             lRelLayout.addView(mVideoView);
>
>             mProgressBar = new ProgressBar(this);
>             mProgressBar.setId(4);
>             android.widget.RelativeLayout.LayoutParams
> lProgressBarLayoutParms = new
> android.widget.RelativeLayout.LayoutParams
> (ViewGroup.LayoutParams.WRAP_CONTENT,
> ViewGroup.LayoutParams.WRAP_CONTENT);
>             lProgressBarLayoutParms.addRule(RelativeLayout.CENTER_IN_PARENT);
>             mProgressBar.setLayoutParams(lProgressBarLayoutParms);
>             lRelLayout.addView(mProgressBar);
>
>             mProgressMessage = new TextView(this);
>             mProgressMessage.setId(5);
>             android.widget.RelativeLayout.LayoutParams
> lProgressMsgLayoutParms = new
> android.widget.RelativeLayout.LayoutParams
> (ViewGroup.LayoutParams.WRAP_CONTENT,
> ViewGroup.LayoutParams.WRAP_CONTENT);
>             lProgressMsgLayoutParms.addRule
> (RelativeLayout.CENTER_HORIZONTAL);
>             lProgressMsgLayoutParms.addRule(RelativeLayout.BELOW, 4);
>             mProgressMessage.setLayoutParams(lProgressMsgLayoutParms);
>             mProgressMessage.setTextColor(Color.LTGRAY);
>             mProgressMessage.setTextSize(TypedValue.COMPLEX_UNIT_PT, 8);
>             mProgressMessage.setText("...");
>             lRelLayout.addView(mProgressMessage);
>         }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to