Code Monkey home page Code Monkey logo

Comments (2)

AsynctaskCoffee avatar AsynctaskCoffee commented on August 17, 2024

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.contains(java.lang.CharSequence)' on a null object reference

Hello! Problem comes from my code 😞 Sorry for this. I can only give some tips for overcome this issue for now. I will fix it later 🦊

videoLayout.setGravity(VideoLayout.VGravity.centerCrop)
videoLayout.setIsLoop(true)
videoLayout.setSound(true)
videoLayout.setPathOrUrl("loginvideotype3.mp4") 

or

app:sound="true"
app:video_gravity="centerCrop"
app:path_or_url="loginvideotype3.mp4"
app:loop="true"

Problem comes from isUrl = FILE_NAME.contains("http://") || FILE_NAME.contains("https://");

If you want to implement video layout programmatically please follow below steps;

frameLayout = findViewById(R.id.frameLayout)
videoLayout = VideoLayout(this)
videoLayout.setGravity(VideoLayout.VGravity.centerCrop)
videoLayout.setIsLoop(true)
videoLayout.setPathOrUrl("loginvideotype3.mp4")
frameLayout.addView(videoLayout)

from videolayout.

AsynctaskCoffee avatar AsynctaskCoffee commented on August 17, 2024

solved 🎉

from videolayout.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.