Thursday, August 17, 2017

How Progress bar in Android

Hello,
        In this tutorial I will show you how to show Progress bar in your Android App, so that while performing a time consuming task such as fetching data from a URL, you can show progress Dialog.

In Order to show a Progress bar follow these steps

1. Add Progress bar in your XML Layout  

 <ProgressBar  
       android:id="@+id/toolbarProgressBar"  
       style="?android:attr/progressBarStyleLarge"  
       android:layout_width="match_parent"  
       android:layout_height="wrap_content"  
       android:layout_centerHorizontal="true"  
       android:layout_centerVertical="true"  
       android:visibility="gone" />  

2. Now to show the progress bar

  progressBar=(ProgressBar) findViewById(R.id.toolbarProgressBar);  
       progressBar.setVisibility(View.VISIBLE);  
       progressBar.animate();  


3. To Stop the Progress bar

  progressBar.setVisibility(View.GONE);  


I hope it was informative for you, and I would like to Thank you for reading.

Thursday, July 27, 2017

How to use ADB Pull And ADB Push

Hello,
        In this tutorial I will show you how to use ADB pull and ADB push commands.

If you have already setup environment Path variable than simple execute CMD, otherwise go to folder where ADB command is and execute Command Prompt from there.

For me ADB command is in folder

C:\Users\muhammad.taqi\AppData\Local\Android\Sdk\platform-tools

To view connected devices type

ADB devices

How to Push Files into your Android Device

adb push e:\myfile.txt /storage/emulated/0/myfolder/myfile.txt

How to Pull Files into your Android Device

 adb pull /storage/emulated/0/myfolder/myfile.txt

This will copy file from you android device to the folder where ADB command is present.

I hope it was informative for you and I would like to thank you for reading.