Posts

How to create pdf reader app in android studio : open subtitles to learn...

Image

Counter Button

Image
Description : It is a javascript based button counter. In this we declare global variable counter which counts the button clicks. The updated counter value is displayed as a text in heading. Example: 0 Counter Button Html Code <!DOCTYPE html> <html> <head> <title>Counter Button</title> <script> var counter = 0; function countBtnClicks() { counter = counter + 1; document.getElementById("txtBtnCount").innerHTML = counter; } </script> </head> <body> <h2 id="txtBtnCount">0</h2> <button onclick="countBtnClicks()">Counter Button</button> </body> </html>

How to create facebook share button using pop up window

Image
Learn to create android browser app in android studio.It uses webview widget. You can use this widget in any app to make it connected with internet. Top 10 windows key shortcuts - become pro with that shortcuts MyPage.html <!Doctype html> <html> <head> <title>Share on facebook</title> <style> img{ cursor: pointer; } </style> <script> function openWindow() { window.open("https://www.facebook.com/dialog/share?app_id=87741124305&href=https%3A//www.youtube.com/attribution_link%3Fa% 3DhCh342iJVIY%26u%3D%252Fwatch%253Fv%253DlK7kH2by7AU%2526feature% 253Dshare&display=popup&redirect_uri=https://www.youtube.com/facebook_redirect", "Share on facebook",'width=700,height=620'); } </script> </head> <body> <h1>How to create browser app in android studio</h1> <iframe width="560" height="315

how to create image scaling animation in android apps

Image
Learn how to create image scaling animation in android studio.It uses Animation class. You can use this in any app to make your app attractive and beautiful. MainActivity.java package com.singh.jassi.myanimation; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.Button; import android.widget.ImageView; public class MainActivity extends AppCompatActivity { ImageView imageView; Button b1; Animation animation; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); imageView=(ImageView)findViewById(R.id.imageView); b1=(Button)findViewById(R.id.button); imageView.setImageResource(R.drawable.myimage); animation= AnimationUtils.loadAnimation(getAppl

How to create android Text To Speech app

Image
Learn to create android text to speech app in android studio.It uses TextToSpeech class. You can use this in any app to speak your written text, reminder, notes and to create talkitive app. MainActivity.java package com.singh.jassi.texttospeech; import android.speech.tts.TextToSpeech; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import java.util.Locale; public class MainActivity extends AppCompatActivity { TextToSpeech tt; Button b1; EditText ed; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); tt=new TextToSpeech(getApplicationContext(),new TextToSpeech.OnInitListener() { public void onInit(int status) { if(status!=TextToSpeech.ERROR) tt.se

Alert Dialogs in android apps

Image
Learn how to create alert dialogs in android apps. We can get decisions and information from user through these alert dialogs. MainActivity.java package com.singh.jassi.alertdialog; import android.content.DialogInterface; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.Toast; public class MainActivity extends AppCompatActivity { public Button button; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); button=(Button)findViewById(R.id.button); } public void my_dialog(View view) { AlertDialog.Builder builder =new AlertDialog.Builder(MainActivity.this); builder.setIcon(R.mipmap.ic_launcher); builder.setTitle("Alert Dialog"); builder.setMess