Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9129777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:49:33+00:00 2026-06-17T07:49:33+00:00

I am working on one custom video player in android. I am using VideoView

  • 0

I am working on one custom video player in android. I am using VideoView for playing video. Initially my VideoView will be of some size (lets say size = (width , height) = (400, 300)). One of the control button of my custom video view is “Expand/Collapse”. After clicking on “Expand/Collapse” button, I want to set VideoView size to fullscreen(means device’s full screen size) if current VideoView size is of Inline and vice versa(from full screen to Inline also).

Do anybody know the proper way to do the above task?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:49:34+00:00Added an answer on June 17, 2026 at 7:49 am

    First of all, you got guts to ask a Android question and have a iOS logo 😉 (kidding)

    But, I think you can use this:

        DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics);
        android.widget.LinearLayout.LayoutParams params = (android.widget.LinearLayout.LayoutParams) videoView.getLayoutParams();
        params.width =  metrics.widthPixels;
        params.height = metrics.heightPixels;
        params.leftMargin = 0;
        videoView.setLayoutParams(params);
    

    and to set it back:

        DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics);
        android.widget.LinearLayout.LayoutParams params = (android.widget.LinearLayout.LayoutParams) videoView.getLayoutParams();
        params.width =  (int) (400*metrics.density);
        params.height = (int) (300*metrics.density);
        params.leftMargin = 30;
        videoView.setLayoutParams(params);
    

    I assume that you know how to make a OnClickListener.

    I got the information here: VideoView Full screen in android application

    Edit1
    I can think of 2 things quickly.
    1. Add this: getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
    2. or try this:

    YourButton.setVisibility(View.GONE);
    

    or

    YourButton.setVisibility(View.INVISIBLE);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am working on one application which requires the feature of adding the custom
In one of the iPad Application, I am working I have added custom views
I'm working on a blog migration from a custom built blog to Wordpress. One
I am working on one real estate website which is Using RETS service to
i'm working with Flash Live Encoder. It's using camera for streaming video. Support forum
I'm working with parsing custom attributes, and I've come across something weird. Let's say
I have custom scrollbar on one page which I managed to get working. For
Currently i am working on one custom asp .net application, client wants to integrate
I am working with Civicrm with Drupal. I created one custom import section. Whenever
I implemented one custom workflow in in Visual Studio 2010 using CRM 2011 Developer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.