Skip to main content

Posts

Showing posts from 2012

Android Sqlite and ListView Example

This is simple application which insert data into Sqlite database --and shows the data  from the database in a ListView ListView is not used in android Anymore . We use RecyclerView and CardView   in Android RecyclerView Demo is available on the following link http://androidtuts4u.blogspot.in/2017/04/android-recyclerview-example.html RecyclerView with CardView Demo is available on the following link http://androidtuts4u.blogspot.in/2017/09/android-card-view-example.html This  is the first Activity of application which shows data from database in listview. Register here buton will start a Registration Activity. Submit button will add data to database and show it in the ListView of MainActivity. Update can be performed by clicking ListView items.     you can download the source code of this project from  google drive   https://drive.google.com/folderview?id=0BySLpWhqmbbdS0dtT1R2TXdBWEE&usp=sharing click on the abov...

Unknown filesystem grub rescue> Error ubuntu

when computer shows    Unknown filesystem grub rescue>   on starting ubuntu  do these things to recover ---. Boot  your computer on a ubuntu live-CD or live-USB ---choose option "Try ubuntu without installation" ---Install Boot Repair       -  open terminal then type             sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update -press enter then type     sudo apt-get install -y boot-repair && boot-repair   ---- if you can't install Boot Repair from repository, dowload it from official   website of Boot Repair --- After Installing open it and click the "Recommended repair" button .         this will fix your system  --- Reboot your system it will work fine if your system is not fixed after this do the following(you have to install grub)   -...

How to install eclipse tar.gz file in ubuntu 12.04

eclipse-SDK-3.7-linux-gtk-x86_64.tar.gz  file can be installed in ubuntu 12.04  like this  1. dowload latest version of eclipse from here   2. extract the eclipse-SDK-3.7-linux-gtk-x86_64.tar.gz file 3. move extracted file to /opt/  directory       mv eclipse /opt/      sudo chown -R root:root eclipse      sudo chmod -R +r eclipse 4. create eclipse exectable in your path      sudo touch /usr/bin/eclipse    sudo chmod 755 /usr/bin/eclipse    sudo nano /usr/bin/eclipse 5. copy this into nano      #!/bin/sh   #export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"   export ECLIPSE_HOME="/opt/eclipse"    $ECLIPSE_HOME/eclipse $* 6. save file using ctrl+o  exit with ctrl+x 7. create gnome menu item        sudo nano /usr/share/applications/eclipse.desktop 8. copy this into nano      ...

Eclipse Cannot Install Android ADT plugin

If Eclipse shows error like this when installing  Android ADT plugin Software being installed: Android Development Tools 11.0.0.v201105251008-128486 (com.android.ide.eclipse.adt.feature.group 11.0.0.v201105251008-128486) Missing requirement: Android Development Tools 11.0.0.v201105251008-128486 (com.android.ide.eclipse.adt.feature.group 11.0.0.v201105251008-128486) requires 'org.eclipse.wst.sse.core 0.0.0' but it could not be found It can be resolved like this 1.Goto Help->Install New Software. 2.C lick On "Available Software Sites". 3.Click ADD and add location ( if the eclipse version is galileo )        "http://download.eclipse.org/releases/ galileo  " 5.Now try to install Android ADT plugin it will work .

Simple Calculator in Android

You can view new updated simple calculator with ViemModel and LiveData in my new blog    https://androidtuts4u.blogspot.com/2021/10/simple-calculator-with-viewmodel-and.html To create a calculator first  we need to create the layout of the calculator. Layout  is created  using XML file given below <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" >  <EditText     android:id="@+id/result_id"       android:layout_width="fill_parent"     android:layout_height="120dp"   />  <Button    android:id="@+id/Btn7_id"      android:layout_width="70dp"    android:layout_height="60dp"    android:layout_below="@id/result_id"   ...