Android GK

Android’s Nougat features

Android Nougat 7 features Android’s latest operating system is now available for all Android fans with lots of new features, especially multi-window features which make one to open more than one app at a time. Of course whenever Google releases new versions of Android, they focus more on security which is big concern as per […]






Android

Android

Android is an open source operating system for mobile and other electronic gadgets including some laptop. The Android operating system software stack consists of Java applications running on a Java based object oriented application framework on top of Java core libraries running on a Dalvik virtual machine featuring JIT compilation. Basics of Android: 1) Open […]






Android

Android example on webview with progressbar

The following example shows that use of android webview with progress bar. 1. copy the following code and paste into “AndroidManifest.xml” <?xml version=”1.0″ encoding=”utf-8″?> <manifest xmlns:android=”http://schemas.android.com/apk/res/android” package=”app.mitindia.com.mywebappprogressbar” > <uses-permission android:name=”android.permission.INTERNET” /> <application android:allowBackup=”true” android:icon=”@mipmap/ic_launcher” android:label=”@string/app_name” android:theme=”@style/AppTheme” > <activity android:name=”.MainActivity” android:label=”@string/app_name” > <intent-filter> <action android:name=”android.intent.action.MAIN” /> <category android:name=”android.intent.category.LAUNCHER” /> </intent-filter> </activity> </application> </manifest> 2. Copy the […]






Android

Android example to show webview

The following example shows that how to use Android WebView for browsing websites using android apps. 1. Copy the following code and paste into “AndroidManifest.xml” <?xml version=”1.0″ encoding=”utf-8″?> <manifest xmlns:android=”http://schemas.android.com/apk/res/android” package=”app.mitindia.com.mywebapp” > <uses-permission android:name=”android.permission.INTERNET” /> <application android:allowBackup=”true” android:icon=”@mipmap/ic_launcher” android:label=”@string/app_name” android:theme=”@style/AppTheme” > <activity android:name=”.MainActivity” android:label=”@string/app_name” > <intent-filter> <action android:name=”android.intent.action.MAIN” /> <category android:name=”android.intent.category.LAUNCHER” /> </intent-filter> </activity> android:debuggable=”true” […]






Android

Android Example to show Popup Menu

In this tutorials you’ll see how “PopupMenu” app is created in Android. Have a look! 1. First of all copy the following code into “activity_main.xml” file <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent” android:paddingLeft=”@dimen/activity_horizontal_margin” android:paddingRight=”@dimen/activity_horizontal_margin” android:paddingTop=”@dimen/activity_vertical_margin” android:paddingBottom=”@dimen/activity_vertical_margin” tools:context=”.MainActivity”> <TextView android:text=”@string/hello_world” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_alignParentTop=”true” android:layout_alignRight=”@+id/button1″ android:layout_alignEnd=”@+id/button1″ android:textSize=”20dp” android:textColor=”#ff00ff”/> <Button android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:id=”@+id/button1″ android:text=”Show popup” android:layout_centerVertical=”true” android:layout_centerHorizontal=”true” /> </RelativeLayout> […]






Android

Android Example to show Context Menu

Android Context menu example Following example shows that how to create context menu application using Android. Follow the below steps to create. a) copy the following code into activity_main.xml” file <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent” android:paddingLeft=”@dimen/activity_horizontal_margin” android:paddingRight=”@dimen/activity_horizontal_margin” android:paddingTop=”@dimen/activity_vertical_margin” android:paddingBottom=”@dimen/activity_vertical_margin” tools:context=”.MainActivity”> <TextView android:text=”@string/hello_world” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:id=”@+id/textView” android:textColor=”#005599″ android:textAlignment=”center” android:textSize=”16pt” /> <ListView android:layout_width=”match_parent” android:layout_height=”wrap_content” android:id=”@+id/listView1″ android:layout_alignParentTop=”true” android:layout_marginTop=”53dp” […]






Android

Android Simple Menu Application

Menu application using Android Following example shows that how to create menu application using Android. Follow the below steps to create. a) copy the following code to “activity_main.xml” <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent” android:paddingLeft=”@dimen/activity_horizontal_margin” android:paddingRight=”@dimen/activity_horizontal_margin” android:paddingTop=”@dimen/activity_vertical_margin” android:paddingBottom=”@dimen/activity_vertical_margin” tools:context=”.MainActivity”> <TextView android:text=”@string/hello_world” android:layout_width=”wrap_content” android:layout_height=”wrap_content” /> <ImageView android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:src=”@drawable/save” android:layout_centerInParent=”true”/> </RelativeLayout> b) Now copy the follwoing code […]






Android

Android program SUM of 2 Numbers

Addition of 2 numbers Step 1. in activity_main.xml file copy the following code. <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent” android:paddingLeft=”@dimen/activity_horizontal_margin” android:paddingRight=”@dimen/activity_horizontal_margin” android:paddingTop=”@dimen/activity_vertical_margin” android:paddingBottom=”@dimen/activity_vertical_margin” tools:context=”.MainActivity”> <TextView android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:text=”Enter First number” android:id=”@+id/t1″ /> <EditText android:layout_width=”103dp” android:layout_height=”wrap_content” android:id=”@+id/n1″ android:layout_alignParentTop=”true” android:layout_centerHorizontal=”true” /> <TextView android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:text=”Enter second number” android:id=”@+id/t2″ android:layout_gravity=”center_vertical” android:layout_below=”@+id/n1″ android:layout_toStartOf=”@+id/n1″ android:layout_marginTop=”39dp” /> <EditText android:layout_width=”92dp” android:layout_height=”wrap_content” android:id=”@+id/n2″ android:layout_gravity=”center_vertical” […]