Friday, 15 April 2016

A Good Start Towards Android Development

Do you want to be an android developer but have no idea where to start? Then this article is for you. Generally, people try to learn Java first and then move on to Android Development.  I would recommend that you directly start with Android Development and to do so there are a few courses that will really help you out.

The first course that I would highly recommend you to take is the Android Development for Beginners course on Udacity. They teach you all the essential things that you need to know, from setting up the Android Studio to making your first good looking app in android. Trust me, this is the best place to begin.

After this, you can go ahead and take a course on Java if you like. There are many courses on Udemy that can help you out as well. One of the best courses on Android Development is Master Android Marshmallow Development by Tim Buchalka. This course is truly amazing. The best part is the instructor keeps the course well updated.



If  you are willing to pay a good amount you can take up the Android Development Nanodegree offered by Google.

If you have any question, please leave them in the comments.

Cheers!  

Thursday, 17 March 2016

How to Make Your App Scrollable?

Are you new to android programming and wondering how to make your app scrollable? Well, it’s pretty simple. Here is how to do it.


<?xml version="1.0" encoding="utf-8"?>

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="wrap_content">


<LinearLayout
   <TextView ....... />
   <CheckBox ....... />


</LinearLayout>
</ScrollView>

As you can see from the above example, to make your app scrollable you have to put all the contents of your app into the ScrollView. ScrollView is a FrameLayout. ScrollView accepts only one child view. This might sound a little confusing. No, it does not mean you can’t have the rest of your views. From the above example, you can see that the ScrollView is parent to the Linear Layout but not to TextView and CheckBox. The LinearLayout is parent to our TextView and CheckBox.  Simple, isn’t it?

FillViewport is an attribute that defines whether the ScrollView should stretch its contents to fill the entire screen or not. If the child is bigger than the ScrollView then it does not make a difference. P.S this attribute works with Relative Layout only.








video












Tuesday, 8 March 2016

How to Make TextView Invisible?

TextView is a view that displays text. Now, the question is how do we make this text disappear and then reappear only when a particular condition is fulfilled? Well, it's easy, here is an example.


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  android:orientation="vertical"
  tools:context="com.ruksarkachchhi.textinvisible.MainActivity">

  <TextView
      android:id="@+id/quotes"
      style="@style/Text"
      android:text="@string/quotes"
      android:visibility="gone" />

  <Button
      style="@style/Text"
      android:onClick="ShowText"
      android:text="Show" />
</LinearLayout>



import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  }

  public void ShowText(View view) {
      TextView quotes = (TextView) findViewById(R.id.quotes);
      quotes.getText().toString();
      quotes.setVisibility(View.VISIBLE);
  }
}

Visibility


Visibility is an view attribute and is written as "android:visibility" in xml. There are three options that you get visible, invisible and gone.

What is the difference between Invisible and Gone?


Well, when you set visibility to be invisible then it occupies a space in the layout but it still stays invisible.  On the other hand when you select visibility to be gone then it does not occupy any space in the layout. Here is how it looks.

Text set to Invisible


            

Text set to Gone

         

Sunday, 20 May 2012

Structure Of Bacteria

Introduction

Bacteria when observed under the electron microscope, shows detail cell structure.
The bacteria has a nucleus without a nuclear membrane.
Based on the staining technique of Christian Gram the bacteria are classified into two types.
  1. Gram positive.
  2. Gram negative.
Bacteria shows the following structures.

Cell Wall
  • The bacterial cell is enclosed by a definite and complex cell wall.
  • The cell composes of several peptidoglycan or mucopeptide layers.
  • The cell wall of gram positive bacteria contains teichoic acid. In gram negative bacteria it is absent.
Functions Of Cell Wall
  1. It gives definite shape and size to the cell.
  2. It protects the cell from toxic materials.
  3. It protects the cell from osmotic lysis.
  4. In some bacteria the components of the cell wall lead to its pathogenic nature.

Gram Positive

A gram positive bacteria is almost similar to gram negative bacteria internally. but, it is totally different in its structure externally. It has cytoplasmic lipid membrane. It has a thick peptidoglycan layer which is made up of mucopeptides, glycopeptides, mureins and which constitutes about 95% of the total cell wall. Teichoic acids and lipoids are present which link to form  lipoteichoic acids. These lipoteichoic acids act as chelating agents and help in attachment to certain substances. The function of teichoic acids is not completely known yet.


Gram Negative

It has a cytoplasmic membrane. It has a thin peptidoglycan layer compared to gram positive bacteria. Outer membrane consists of Lipopolysaccharides. There is a space between the layers of peptidoglycan and the secondary cell membrane called the periplasmic space.

Structures Outside the Cell Wall
The structures present outside the cell wall help in protection, attachment to other objects and movement of the cell.

Glycocalyx
  • It is a sugar coat formed by the network of polysaccharides.
  • It is present just outside the cell wall.
  • It is also known as the bacterial capsule.
  • It protects the bacteria from phagocytes.

Flagella

  • It is 20nm in its thickness.
  • It is made up of a protein called flagellin.
  • It is hollow, cylindrical and helical in shape.
  • The flagellin is responsible for the helical structure of the flagella.
  • It helps in locomotion.

Pilli

  • It is a thin, hollow, cylindrical, hairlike structure.
  • It is similar to flagella.
  • It does not promote locomotion.
  • It is helps in attachment to surfaces.
  • Some pilli called as sex pilli help in the transfer of genetic material.

Tuesday, 21 February 2012

What Are Bacteria?


Introduction
  • Bacteria are unicellular micro-organisms. These are Prokaryotic in cellular organisation and placed under the kingdom Monera in a single Class Schizomycetes.
  • Bacteria were not known until the invention of the microscope.
  • Bacteria were discovered by Anton van Leeuwenhoek in Delft, Holland in 1676.
  • Leeuwenhoek with the help high power lenses observed his own teeth scrapping and found that it contained millions of living creatures or organisms and he named them Animalcules.
  • Ehrenberg first called these creatures as Bacteria.
  • Later researches were carried out by Louis Pasteur and Robert Koch which highlighted the importance of bacteria.
  • But at present a lot of information is available regarding bacteria and viruses.
Characters of Bacteria
  • Bacteria are found in soil, water, air and also inside the body of living organisms.
  • These can withstand extreme drought, cold and heat.
  • Some bacteria live as parasites on other living organisms and plants.
  • Some plants live in symbiotic association. For example., Rhizobium forms root nodules of legumes and fixes atmospheric nitrogen, Escherichia coli commonly called E.coli lives in the intestine of man.
  • Bacteria are found in different shapes such as rod shape, spherical shape, comma shape, and spiral shape.
  • Bacteria that change their shape according to the environment and nutrients available are called pleomorphic bacteria. For example., Acetobacter.

Sunday, 12 February 2012

Microbiology


  • Microbiology is a branch of biology that deals with the study of invisible organisms or micro-organisms. These organisms can be observed in the microscope only.
  • Organisms such as algae, fungi, protozoa, bacteria, viruses fit into this criteria and hence are referred as micro-organisms. However some algae and fungi are macroscopic and visible with naked, yet they are studied my microbiologists.
  • Microbiology employs techniques such as sterilization and the use of culture media that are necessary for successful isolation and growth of micro-organisms.
  • Micro-organisms are present everywhere in our environment.
  • There are some micro-organisms that can tolerate extreme acidic, alkaline conditions, high and low temperatures and salt concentrations. Such organisms are called acidophilic, alkalophilic, thermophilic and halophilic organisms respectively.
Importance of Microbiology
  • Micro-organisms recycle elements such as oxygen, sulphur, carbon, nitrogen, phosphorus.
  • Micro-organisms help in creating a disease free world by producing antibiotics and vaccines.
  • The antibiotic Penicillin was discovered by Alexander Fleming from a fungus called Penicillium notatum.
  •  Walksman obtained Streptomycin from Streptomyces griseus.
  • Industrial products such as enzymes, amino acids, vitamins, organic acids and alcohols are commercially produced by micro-organisms.
  • Micro-organisms play an important role in production of dairy products.
  • Microbes like bacteria and fungi are used in sewage disposal.
  • Micro-organisms are also used in extracting valuable metals such as uranium from the rocks. This reduces more than 20% of the cost.
  • One of the biggest achievements of microbiology is the ability to alter genetic material of organisms. This is commonly referred to as Genetic Engineering.
  • Micro-organisms are used as bio-control agents.
  • Methane gas is also produced by the activity of  micro-organisms, which can be used as a fuel.
With the advent of RDNA technology and genetic engineering microbiology has become a weapon to unravel the challenges in the field of Biotechnology.