Chuyển đến nội dung chính

Bài đăng

Đang hiển thị bài đăng từ Tháng 8, 2016

How to create webview and load html code into that WebView using android java

     This post shares some useful information about the WebView. We will see how to create a new WebView and how to load a html code into the newly created WebView in android. In the previous post we saw about creating WebView in android studio. In case if you missed it  please click here WebView is a view that display web pages inside an application. We can also specify html string and can show it inside your application using WebView. WebView turns your application to a web application. To load a html code into a WebView use the following code Code to load html code directly into WebView String html = " < html > < body > This is the test webview < / body > < / html > " ; String mime = "text / html" ; String encoding = "utf - 8" ; WebView myWebView = ( WebView ) this . findViewById ( R . id . myWebView ) ; myWebView.getSettings().setJavaScriptEnabled(true); myWebView.loadDataWithBaseURL(null, html , mime , encoding , nu

Different image for focused,pressed and normal state in android button

     In this tutorial we are going to learn about the android button and every state (pressed,focused and normal) of an image when placed on that button. 1) First create a new project in android studio more details... 2) Remove the TextView code from activity_main.xml , create a button in your project by using the following code or tools. < Button android : layout_height = " wrap_content " android : layout_width = " wrap_content " android : background = " @drawable/btnhome_new " /> Note:      In the above image you can see an error @drawable/btnhome_new . This is because the program contains the file btnhome_new.xml   on drawable directory, which is not yet created. 3) Now we are going to create a file btnhome_new.xml  on drawable directory.    a) Right click on the drawable directory  => New => Drawable resource file      b) Now a file is opened  btnhome_new.xml just remove all the code from that file and replace w

How to set multiple images in a loop javascript?

     In the following javascript code is used to create the html img tag dynamically and append it to the specified div in a loop. Create Image tag using javacript       Usually we are directly create the html tag in the html code, but if you want to create this img tag dynamically you can follow the below code.    var img = document.createElement("img");    img.src = "http://www.google.com/intl/en_com/images/logo_plain.png";    var src = document.getElementById("elementid");    src.appendChild(img); Set multiple images in a loop      If you want to add only one image, you can follow the above method. If you want to append more images dynamically you can follow the below method. Example Program:- (Editor) Editor is Loading... Output:- Advertisement

Create first webview in android studio

      Webview is a tool in android studio and it is used to load html or website to mobile, through this we can easy to create the android application through html,css and javascript code. 1) First create a new project in android studio more details... 2) Open activity_main.xml file under the layout folder. 3) Copy the following code to the activity_main.xml < WebView xmlns : android = " http : // schemas.android.com /apk/res/android " android : id = " @+id/webview " android : layout_width = " fill_parent " android : layout_height = " fill_parent " />      When you add the code to activity_main.xml you can see the preview by clicking Design. 4) You must set internet permission in AndroidManifest.xml. Open AndroidManifest.xml file and enter the following code. < uses - permission android : name = " android.permission.INTERNET " / > 5) Open MainActivity .java file and modify it by the below steps.        a)

Microsoft Office 2016 with One Click Activation

Hello Dear!! This is MS Office 2016 Full. First download Office 2016 from Microsoft. First Sign in to Microsoft to download MS Office free for one month. Official Download Link One Click A ح t ز vat ز on is the easiest and safest way to activate MS Office 2016. It is a cmd script you have to just download it and run it as administrator. This file was scanned by google and mediafire. So don't worry of virus. Download Now

How to create new project in android studio?

1) Open Android studio, then find the File  option from the menu bar and go to New => New Project. 2) Now one new dialog box is open and ask the project details Application name, Company Domain and project location. Application name       No need to enter unique name compare with playstore, this name is displayed under the application icon. Company Domain       It must be unique compare between the google play store (If you created the name and the same name already in playstore it won't show any error message, but in publishing time it will show a error). Project Location       It will automatically take the previous project path, if you want the same path no need to change it, or you can change. 3) Then press Next button      In this window select the minimum target SDK ,wear, TV, and Android auto. Minimum SDK      Here you can select the minimum required android os version. Wear       This mean is this application support wearable android device or not (If yes then check o

How to set the SDK, NDK and JDK path to android studio?

If you want to set the SDK path  directly you can set it to in local.properties like below sdk.dir = D \:\\ Program Files \\ Android Studio \\ SDK If you want to set the NDK path  directly you can set it to in  local.properties  like below ndk.dir = C \:\\ android-ndk-r12b-windows-x86 \\ android-ndk-r12b We can set the path by selecting folder by using the below method. After open the android studio press C trl+Shift+Alt+S

Windows 10 Anniversary Update 1607(Redstone) 2016 ISO Download

Image Collected from Microsoft Microsoft has recently released their 1 year anniversary update of windows 10 whose build version is 1607. You can download this latest ISO from the official link from Microsoft . And Who are already using windows 10( 10586 ) have already been received 14393 Windows Update . However, the best , and if possible, download the fresh copy and install the new fresh ISO. So that You can get better Performance. Official Direct Download Link: https://www.microsoft.com/en-us/software-download/windows10ISO/ Select: Windows 10> English  ------------------------------------- In order to Install the Windows 10 on you device you need to burn the ISO to a USB flash drive or DVD. To burn the ISO to a USB flash drive or DVD You need to download and install "Microsoft Media Creation Tool." Download link below: Download Media Creation Tool to use the ISO ------------------------------ Activation of Windows 10 There are several ways to Activate Win