Introduction to Sass for CSS

Introduction to Sass for CSS

Sass makes CSS fun again and you can learn it in less than an hour. If you have already mastered CSS, then you are ready for Sass. Sass (Syntactically Awesome Stylesheets) is a CSS preprocessor—a layer between the stylesheets you author and the .css files you serve to the browser. It opens up a whole new range of features not available in plain vanilla CSS.

Learn the core features of Sass like variables, inheritance, nesting, mixins, and more. Learn how to build alert panels and how to configure Sass for development. Master CSS efficiency with Sass and make your code more readable, concise and sassy.

Access this course on Zenva Academy

Share this article

  • Thanks a lot, this article helped me to get “unstucked”. The android documentation “Take photos simply” has problems and doesn’t work as expected.

    I implemented this for an internal solution for my company, the only thing i added is to allow the pictures be shown in the gallery by adding this method:

    private void addPhotoToGallery() {
    Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
    mediaScanIntent.setData(file); //your file uri

    and that’s called once the result is ok in the onActivityResult callback.

    thanks again 🙂

  • Eric Loo

    I was referring to the “Take photos simply” tutorial before I was here, and faced the same problem as you did. Seriously this author is much better than that one!

  • Eric Loo

    Also your solution helped me to show the pictures taken in the Gallery, thanks!

  • rehsouna

    thank you that was so helpful, i want to ask if there is any way to clear those photos from memory after the app is closed .

  • rashed ul islam

    nice explanation. Btw a query : inside takePicture( ) method in line no 3, variable “file” shouldn’t be declared first ? as an Uri file; ?

  • Fares Turki

    I just tried this and the app crashs as soon as I click the button with this error :

    java.lang.IllegalStateException: Could not execute method for android:onClick

    What did I do wrong ? I even copied the whole Java and XML source code to be sure.

  • Ashwin H

    Thanks, it works for ( Android marshmallow 6.0.1)

  • Reef

    Hi, thank you very much for this working code.

    If I have 2 imageView to set images to, how can i modify the code to do that please?

    Thank you!!

  • Spike

    Please help, what exactly is “file” in this code. It is currently shown as red an I don’t know how to fix it.

  • rahmatNazali

    Try to declare the “file” variable as Uri object far above just after the declaration of MainActivity Object, like so:

    Uri file;

    I hope this helps

  • Michael Scott Martens

    Running this through API 24, produces an error of FileUriExposedException. would it be possible to revise your example to also include working with this API as well? You have good tutorial, by the way! I learned a few things about permissions.