Program for Palindrome checking in C Sharp/C#
Hi, Sometimes you need to check for whether the given string is Palindrome or not. Given below is a sample code to check whether the given string is Palindrome or not using C Sharp/C#. 🙂
Hi, Sometimes you need to check for whether the given string is Palindrome or not. Given below is a sample code to check whether the given string is Palindrome or not using C Sharp/C#. 🙂
Hi all……. All of you may be familiar with TextViews in ANDROID. But how many of you know that we have have html as text in a textView. This post is a simple example to show this. Create a fresh project and copy this code to the main java file. The main.xml The AndroidManifest.xml file
This example opens the photogallery and then when you select a file from it , it will be copied to your resources directory. First manually create a directory in your resources, here the directory is named “mydirectory”. Call this functiion inside a button click or something Now after running this code check the directory you… Read More »
This is a simple example showing email validation in ANDROID. This example uses regex for email validation. Create a button and an edittext in your main.xml file and try this code. Check this link to find how you can send email from android programatically. Please leave your valuable comments……
Hi, Here is a simple program to generate Fibonacci series using C Sharp /C#. It will generate Fibonacci numbers < 100. [csharp] class MainClass { public static void Main() { int oldNum = 1; int presentNum = 1; int nextNum; System.Console.Write(presentNum + ","); while (presentNum < 100) { System.Console.Write(presentNum + ","); nextNum = presentNum +… Read More »
For implementing a ListView, we first create a xml which contains a ListView named list.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout  xmlns:android="http://schemas.android.com/apk/res/android"  android:layout_width="fill_parent"  android:layout_height="fill_parent">  <ListView   android:id="@+id/listview"   android:layout_width="fill_parent"   android:layout_height="fill_parent"   /> </LinearLayout> Next we create a Dialog Object and inflate the above xml and when the listItem… Read More »
GridViews are those in which you can arrange elements in a two dimensional grid. It is what you see in the gallery where images are arranged. Here images are arranged in a two dimensional grid. Copy the below code and save it as “MyGridView.java” package com.pack; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import… Read More »
Progress bars are our basic needs when we want to show something for a long time or some progress takes a long time and we want to show it’s progress. Keeping that in mind ANDROID also has built in progress views. There are basically two types of progress views in ANDROID. ProgressDialog.STYLE_SPINNER and ProgressDialog.STYLE_HORIZONTAL Take… Read More »
With the following code you can load images in your drawable folder dynamically by giving the filename as a String. For that you have to use getResources().getIdentifier which has parameters as the “path”,”drawable” and the “package name”. This returns a unique resource ID which can be used to set the image for a ImageView using… Read More »
This sample code helps you to load html from a string and from a file into webview in ANDROID. String str = Your HTML String; /* use src=’file:///android_asset/images/photo_3.jpg’ for loading images from the assets /images folder */ /* To load from a string use loadDataWithBaseURL */ webview.loadDataWithBaseURL("",str , "text/html", "utf-8", ""); /* To load from… Read More »