We Help You To Renovate Your Blogger Blog With Awesomeness!

Friday, August 7, 2015

  • Android Studio - Rendering Problems The following classes could not be instantiated: - android.support.v7.internal.widget.ActionBarOverlayLayout

    Fix res/values/styles.xml  :



    <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar"/>
     
    Detailed explanation as requested: Theme.AppCompat.Light.DarkActionBar is a subclass of the superclass Base anyway.

  • Android studio Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.



     Android studio Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

     

    For Android Studio 1.3 : (Method 1)

    Step 1 : Open gradle.properties file in your Android Studio project.
    Step 2 : Add this line at the end of the file
    org.gradle.jvmargs=-XX\:MaxHeapSize\=256m -Xmx256m

    Above methods seems to work but if in case it won't then do this (Method 2)

    Step 1 : Start Android studio and close any open project (File > Close Project).
    Step 2 : On Welcome window, Go to Configure > Settings.
    Step 3 : Go to Build, Execution, Deployment > Compiler
    Step 4 : Change Build process heap size (Mbytes) to 1024 and Additional build process to VM Options to -Xmx512m.
    Step 5 : Close or Restart Android Studio.



  • Friday, January 2, 2015

  • Full screen Overlay using CSS only- CSS Only Modal Popup

    Full screen Overlay Effects 




    When you search for a solution for fullscreen overlay, most website provide solutions using JavaScript or jQuery. The following solution is using only CSS and not using any JavaScript of jQuery. Here we are going to create a pop-up window that overlays an existing html page and disabling all links and bringing into focus on the pop up window.






     Sometimes you need your entire browser window with a black tint in the background and make a popup at the center of the screen. Normally this technique is used for displaying a login window without moving from existing page or displaying a video, when a user clicks on a link or button in a web page.



    Add this to your Page

     <style>
            .button {
                width: 150px;
                padding: 10px;
                background-color: #2d57f8;
                box-shadow: -8px 8px 10px 3px rgba(0,0,0,0.2);
                font-weight: bold;
                text-decoration: none;
            }

            #cover {
                position: fixed;
                top: 0;
                left: 0;
                background: rgba(0,0,0,0.6);
                z-index: 5;
                width: 100%;
                height: 100%;
                display: none;
            }

            #popupScreen {
                height: 380px;
                width: 340px;
                margin: 0 auto;
                position: relative;
                z-index: 10;
                display: none;
                background: url(login.png) no-repeat;
                border: 5px solid #cccccc;
                border-radius: 10px;
                background-color:rgb(245,245,245);
            }

                #popupScreen:target, #popupScreen:target + #cover {
                    display: block;
                    opacity: 2;
                }

            .cancel {
                display: block;
                position: absolute;
                top: 3px;
                right: 2px;
                background: rgb(245,245,245);
                color: black;
                height: 30px;
                width: 35px;
                font-size: 30px;
                text-decoration: none;
                text-align: center;
                font-weight: bold;
            }
        </style>



    HTML Code

    place anywhere 
      <div align="center"><a href="#popupScreen" class="button">Click here for Dialog</a> </div>
                        <div id="popupScreen">
                            <a href="#" class="cancel">&times;</a>

                       
                            <h2>Hi there</h2>
                        </div>
                        <div id="cover"></div>




    ×

    Hi there

  • Copyright @ 2013 Code Snippets.