Sunday, May 3, 2020

How to add Progress Bar while loading Image in ImageView App development in Android Studio

- Use Frame Layout. - Set gravity of all elements including Layout to center. - Use Picasso Library in Build Gradle App. -in Success function use ProgressBar dot setVisibility to View[dot]GONE. Watch this video to get full knowledge:


Sunday, April 19, 2020

Re-Download Dependecies and Gradle Sync Failed Android Studio Error Fix when upgrade to new version.

Problem:


Re-download dependecies and sync project(requires network)
Gradle 'MyApplication' project refresh failed
Gradle's dependecies cache may be corrupt(this sometimes occurs after a
failed to open zip file. network timeout.)
Gradle sync failed: No cached version of
Re-download dependecies and sync project(requires network) com.android.tools.build:gradle...
available for offline mode


Solution:

1. Close android studio app then Using ccleaner clear cache of pc.
2. Then in c drive go to user then [dot]gradle file, delete all files. 3. Open android studio again click on file then click on invalidate cache/restart. 4. When android studio will restart it automatically start downloading gradle from source website.

Below are setting for source of gradle online: Other addtional options: 1. Change url in gradle.properties for downloading gradle. Get the required one from gradle official website.
2. In file setting build select gradle source to wrapped file i.e. gradle.properties






Thanks for watching. Please Subscribe my Channel for more updates.
gradle,error,android,studio,can't sync,try sync again,gradle not found,re-download gradle dependencies,Gradle sync failed,artifacts,cache may corrupt,invalidate cache,graddle.wrapper,properties,gradle version,android plugin version,Gradle sync failed: No cached version of com.android.tools.build,available for offline mode,Re-download dependecies and sync project(requires network),Gradle's dependecies cache may be corrupt(this sometimes occurs after a network timeout.)


Monday, April 13, 2020

Key sequences or Shorcut in MS Word for adding row in Table using keyboard



Hi everyone,

                               Today i will show you how to add a row in a table in MS Word or add many rows with keyboard shortcut.

Inside table when you press and hold Alt and then the sequence will be Alt+a+i+a then it will add a row.

But the same (press and hold Alt and then the sequence Alt+a+i+a), when you press this below the table then it will ask for number of rows.

The key sequence working: Press and hold alt key, then press a, then press i, then press a.
Lets see this all in a simple video:

Monday, December 30, 2019

How to make an Image Slider using jQuery, Html and CSS for Website.

Image Slider for website.

Website Tools > Image Slider

1. In this we will add an <img> tag in html, with the help of jQuery we will change its source file time to time by setInterval function.
Click Here! (Link for slider demo.)

jQuery:
<script>
            $(document).ready(function(){
                $(".sliderstatus").text('Slider Status:Working!');
                
                var count=1;
                var img=new Image();
                img.src="../img/sliderImages/1.jpg";
                $(".a1").attr("src","../img/sliderImages/1.jpg");
//When we click left button to see previous slide.       
                $(".leftb").click(function(){
                     clearInterval(start);
                     if($(".sliderstatus").text()!='Slider Status:paused!')
                        {
                        $(".sliderstatus").text( 'Slider Status:paused!');
                        }
                     $(".status").attr("src","../img/sliderImages/play.png");
                     $(".status").show();
                    if(count==1){count=4}

                    else{count--;}

                    $(".a1").attr("src","../img/sliderImages/"+count+".jpg");
                });
//When we click right button to see next slide.    
                $(".rightb").click(function(){
                    clearInterval(start);
                    if($(".sliderstatus").text()!='Slider Status:paused!')
                        {
                        $(".sliderstatus").text( 'Slider Status:paused!');
                        }
                    $(".status").attr("src","../img/sliderImages/play.png");
                    $(".status").show();
                    if(count==4){count=1}

                    else{count++;}

                    $(".a1").attr("src","../img/sliderImages/"+count+".jpg");
                });
                         
                        
                $(".status").click(function(){
                       start=setInterval(function(){ slider()},2000);
                         if($(".sliderstatus").text()=='Slider Status:paused!')
                        {
                        $(".sliderstatus").text( 'Slider Status:Working!');
                        $(".status").hide();
                        }
                });
                         
            function slider(){
                    if(count==4){count=1}

                    else{count++;}

                    $(".a1").animate({left: "-600px"});
                    $(".a1").animate({left: '0px'});
//This line will change source file of image tag.
                    $(".a1").attr("src","../img/sliderImages/"+count+".jpg");
            };
           
            var start=setInterval(function(){ slider() },2000);

            });

            function again(){
                var start;
                }
</script>

                                                                

CSS:
           #center{
                position: relative;
                top: 150px;
            }
            #slider{
                position: relative;
                height: 20%;
                width: 60%;
                left: 22%;
            }
            #center img{
                position: absolute;
                border: 3px #009933 solid;
            }
            #buttons{
                position: relative;
                top: 530px;
                padding: 3px;
            }
            #buttons img:hover{
                cursor: pointer;
            }
            .leftb{
                position: absolute;
                padding: 3px;
                margin-left: -30px;
                border: 1px solid black;
            }
            .rightb{
                position: absolute;
                padding: 3px;
                margin-left: 30px;
                border: 1px solid black;
            }
             .leftb:hover, .rightb:hover{
             border: 1.5px solid black;
             }
             .status{
                 position: absolute;
                 top: 35px;
                 left: 56%;
             } 
 

HTML:
       <div id="center">
          <div id="slider">
               <img class="a1">
          </div>
       </div>
       <div id="buttons"><center>
                   <img class="leftb" src="../img/sliderImages/left.png">     
                   <img class="rightb" src="../img/sliderImages/right.png"> 
              <p class="sliderstatus">Slider Status:</p><img class="status">
                                </center> 
       </div>

Sunday, August 18, 2019

How to Fix Case bypasses initialization of a local variable.

This error occurs when we use switch statement and different cases. We declare or initialize variables in one case but when our switch statement bypass that case in which any variable is declared and that variable is used in other cases which match the switch statement arguments, in that case compiler will show this problem.

#CaseBypasses #cPlusPlusProblem