package sunsigns2014.findyourfate.com;

 

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.AdapterView.OnItemSelectedListener;
import sunsigns2014.findyourfate.com.zodiacinrussian2019.MyAdapter;

public class daily extends Activity{
	TextView title;
//	private AdView mAdview;
	String lang,lang1;
	TextView aries,taurus,gemini,cancer,leo,virgo,libra,scorpio,sagg,capri,aquar,pisces;
	
	
	   String[] Languages = { "Choose Language flag", "English", "French", "Spanish", "Hindi","Dutch", "Arabic", "Malay", 
				  "German","Chinese","Japanese","Russian","Portuguese"};
			 
		Integer[] images = { 0, R.drawable.us, R.drawable.france,R.drawable.spanish, R.drawable.india, R.drawable.dutch, R.drawable.arabia, R.drawable.malay, R.drawable.germany, R.drawable.china, R.drawable.japanse, R.drawable.russia, R.drawable.port};

		
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		
			 	
		lang=getIntent().getStringExtra("language");
		
		if(lang.equals("English")) 
		{
			  setContentView(R.layout.eng2020);
		}
		else if(lang.equals("French"))
  	    {
			setContentView(R.layout.alllang20);
			
			
			
			 aries=(TextView) findViewById(R.id.ariest);
			    taurus=(TextView) findViewById(R.id.taurust);
			    gemini=(TextView) findViewById(R.id.geminit);
			    cancer=(TextView) findViewById(R.id.cancert);
			    leo=(TextView) findViewById(R.id.leot);
			    virgo=(TextView) findViewById(R.id.virgot);
			    libra=(TextView) findViewById(R.id.librat);
			    scorpio=(TextView) findViewById(R.id.scorpt);
			    sagg=(TextView) findViewById(R.id.sagt);
			    capri=(TextView) findViewById(R.id.caprit);
			    aquar=(TextView) findViewById(R.id.aquart);
			    pisces=(TextView) findViewById(R.id.piscest);
			    
			    aries.setText("Bélier");
			    taurus.setText("Taureau");
			    gemini.setText("Gemeaux");
			    cancer.setText("Cancer");
			    leo.setText("Lion");
			    virgo.setText("Vierge");
			    libra.setText("Balance");
			    scorpio.setText("Scorpion");
			    sagg.setText("Sagittaire");
			    capri.setText("Capricorne");
			    aquar.setText("Verseau");
			    pisces.setText("Poisson");
  	  	 }
	  	else if(lang.equals("Chinese"))
		  {
	  		setContentView(R.layout.alllang20);
			 
			  aries=(TextView) findViewById(R.id.ariest);
			    taurus=(TextView) findViewById(R.id.taurust);
			    gemini=(TextView) findViewById(R.id.geminit);
			    cancer=(TextView) findViewById(R.id.cancert);
			    leo=(TextView) findViewById(R.id.leot);
			    virgo=(TextView) findViewById(R.id.virgot);
			    libra=(TextView) findViewById(R.id.librat);
			    scorpio=(TextView) findViewById(R.id.scorpt);
			    sagg=(TextView) findViewById(R.id.sagt);
			    capri=(TextView) findViewById(R.id.caprit);
			    aquar=(TextView) findViewById(R.id.aquart);
			    pisces=(TextView) findViewById(R.id.piscest);
			    
		
		  }
	  	else if(lang.equals("Spanish"))
	  	  {
	  		setContentView(R.layout.alllang20);
	  		
	  		 aries=(TextView) findViewById(R.id.ariest);
			    taurus=(TextView) findViewById(R.id.taurust);
			    gemini=(TextView) findViewById(R.id.geminit);
			    cancer=(TextView) findViewById(R.id.cancert);
			    leo=(TextView) findViewById(R.id.leot);
			    virgo=(TextView) findViewById(R.id.virgot);
			    libra=(TextView) findViewById(R.id.librat);
			    scorpio=(TextView) findViewById(R.id.scorpt);
			    sagg=(TextView) findViewById(R.id.sagt);
			    capri=(TextView) findViewById(R.id.caprit);
			    aquar=(TextView) findViewById(R.id.aquart);
			    pisces=(TextView) findViewById(R.id.piscest);
			    
			    aries.setText("Aries");
			    taurus.setText("Tauro");
			    gemini.setText("Géminis");
			    cancer.setText("Cáncer");
			    leo.setText("León");
			    virgo.setText("Virgo");
			    libra.setText("Libra");
			    scorpio.setText("Escorpio");
			    sagg.setText("Sagitario");
			    capri.setText("Capricornio");
			    aquar.setText("Acuario");
			    pisces.setText("Piscis");
			    
	  	 }
	  	 else if(lang.equals("Dutch"))
	  	 {
	  		setContentView(R.layout.alllang20);
	  		 aries=(TextView) findViewById(R.id.ariest);
			    taurus=(TextView) findViewById(R.id.taurust);
			    gemini=(TextView) findViewById(R.id.geminit);
			    cancer=(TextView) findViewById(R.id.cancert);
			    leo=(TextView) findViewById(R.id.leot);
			    virgo=(TextView) findViewById(R.id.virgot);
			    libra=(TextView) findViewById(R.id.librat);
			    scorpio=(TextView) findViewById(R.id.scorpt);
			    sagg=(TextView) findViewById(R.id.sagt);
			    capri=(TextView) findViewById(R.id.caprit);
			    aquar=(TextView) findViewById(R.id.aquart);
			    pisces=(TextView) findViewById(R.id.piscest);
			    
			    aries.setText("Ram");
			    taurus.setText("Stier");
			    gemini.setText("Tweelingen");
			    cancer.setText("Kreeft");
			    leo.setText("Leeuw");
			    virgo.setText("Maagd");
			    libra.setText("Weegschaal");
			    scorpio.setText("Schorpioen");
			    sagg.setText("Boogschutter");
			    capri.setText("Steenbok");
			    aquar.setText("Waterman");
			    pisces.setText("Vissen");
			    
	  	 }
	  	 else if(lang.equals("Russian"))
	  	 {
	  		setContentView(R.layout.alllang20);
	  		
	  	  aries=(TextView) findViewById(R.id.ariest);
		    taurus=(TextView) findViewById(R.id.taurust);
		    gemini=(TextView) findViewById(R.id.geminit);
		    cancer=(TextView) findViewById(R.id.cancert);
		    leo=(TextView) findViewById(R.id.leot);
		    virgo=(TextView) findViewById(R.id.virgot);
		    libra=(TextView) findViewById(R.id.librat);
		    scorpio=(TextView) findViewById(R.id.scorpt);
		    sagg=(TextView) findViewById(R.id.sagt);
		    capri=(TextView) findViewById(R.id.caprit);
		    aquar=(TextView) findViewById(R.id.aquart);
		    pisces=(TextView) findViewById(R.id.piscest);
		    
		    aries.setText("Овен");
		    taurus.setText("Телец");
		    gemini.setText("Близнецы");
		    cancer.setText("Рак");
		    leo.setText("Лев");
		    virgo.setText("Дева");
		    libra.setText("Весы");
		    scorpio.setText("Скорпион");
		    sagg.setText("Стрелец");
		    capri.setText("Козерог");
		    aquar.setText("Водолей");
		    pisces.setText("Рыбы");
	  	 }
	  	 else if(lang.equals("Arabic"))
	  	 {
	  		setContentView(R.layout.alllang20);
	  	  aries=(TextView) findViewById(R.id.ariest);
		    taurus=(TextView) findViewById(R.id.taurust);
		    gemini=(TextView) findViewById(R.id.geminit);
		    cancer=(TextView) findViewById(R.id.cancert);
		    leo=(TextView) findViewById(R.id.leot);
		    virgo=(TextView) findViewById(R.id.virgot);
		    libra=(TextView) findViewById(R.id.librat);
		    scorpio=(TextView) findViewById(R.id.scorpt);
		    sagg=(TextView) findViewById(R.id.sagt);
		    capri=(TextView) findViewById(R.id.caprit);
		    aquar=(TextView) findViewById(R.id.aquart);
		    pisces=(TextView) findViewById(R.id.piscest);
		    
		    aries.setText("برج الحمل");
		    taurus.setText("برج الثور");
		    gemini.setText("الجوزاء");
		    cancer.setText("السرطان");
		    leo.setText("ليو");
		    virgo.setText("برج العذراء");
		    libra.setText("برج الميزان");
		    scorpio.setText("برج العقرب");
		    sagg.setText("برج القوس");
		    capri.setText("برج الجدي");
		    aquar.setText("برج الدلو");
		    pisces.setText("برج الحوت");

	  	 }
	  	 else if(lang.equals("German"))
	  	 {
	  		setContentView(R.layout.alllang20);
	  		  aries=(TextView) findViewById(R.id.ariest);
			    taurus=(TextView) findViewById(R.id.taurust);
			    gemini=(TextView) findViewById(R.id.geminit);
			    cancer=(TextView) findViewById(R.id.cancert);
			    leo=(TextView) findViewById(R.id.leot);
			    virgo=(TextView) findViewById(R.id.virgot);
			    libra=(TextView) findViewById(R.id.librat);
			    scorpio=(TextView) findViewById(R.id.scorpt);
			    sagg=(TextView) findViewById(R.id.sagt);
			    capri=(TextView) findViewById(R.id.caprit);
			    aquar=(TextView) findViewById(R.id.aquart);
			    pisces=(TextView) findViewById(R.id.piscest);
			    
			    aries.setText("Widder");
			    taurus.setText("Stier");
			    gemini.setText("Zwillinge");
			    cancer.setText("Krebs");
			    leo.setText("Löwe");
			    virgo.setText("Jungfrau");
			    libra.setText("Waage");
			    scorpio.setText("Skorpion");
			    sagg.setText("Schütze");
			    capri.setText("Steinbock");
			    aquar.setText("Wassermann");
			    pisces.setText("Fische");   
		
	  	 }
	  	 else if(lang.equals("Portuguese"))
	  	 {
	  		setContentView(R.layout.alllang20);
	  		  aries=(TextView) findViewById(R.id.ariest);
			    taurus=(TextView) findViewById(R.id.taurust);
			    gemini=(TextView) findViewById(R.id.geminit);
			    cancer=(TextView) findViewById(R.id.cancert);
			    leo=(TextView) findViewById(R.id.leot);
			    virgo=(TextView) findViewById(R.id.virgot);
			    libra=(TextView) findViewById(R.id.librat);
			    scorpio=(TextView) findViewById(R.id.scorpt);
			    sagg=(TextView) findViewById(R.id.sagt);
			    capri=(TextView) findViewById(R.id.caprit);
			    aquar=(TextView) findViewById(R.id.aquart);
			    pisces=(TextView) findViewById(R.id.piscest);
			    
			    aries.setText("Áries");
			    taurus.setText("Touro");
			    gemini.setText("Gêmeos");
			    cancer.setText("câncer");
			    leo.setText("Leão");
			    virgo.setText("Virgem");
			    libra.setText("Libra");
			    scorpio.setText("Escorpião");
			    sagg.setText("Sagitário");
			    capri.setText("Capricórnio");
			    aquar.setText("Aquário");
			    pisces.setText("Peixes");
	
	  	 }
	  	 else if(lang.equals("Malay"))
	  	 {
	  		setContentView(R.layout.alllang20);
	  		  aries=(TextView) findViewById(R.id.ariest);
			    taurus=(TextView) findViewById(R.id.taurust);
			    gemini=(TextView) findViewById(R.id.geminit);
			    cancer=(TextView) findViewById(R.id.cancert);
			    leo=(TextView) findViewById(R.id.leot);
			    virgo=(TextView) findViewById(R.id.virgot);
			    libra=(TextView) findViewById(R.id.librat);
			    scorpio=(TextView) findViewById(R.id.scorpt);
			    sagg=(TextView) findViewById(R.id.sagt);
			    capri=(TextView) findViewById(R.id.caprit);
			    aquar=(TextView) findViewById(R.id.aquart);
			    pisces=(TextView) findViewById(R.id.piscest);
			    
			    aries.setText("Aries");
			    taurus.setText("Taurus");
			    gemini.setText("Gemini");
			    cancer.setText("Kanker");
			    leo.setText("Leo");
			    virgo.setText("Virgo");
			    libra.setText("Libra");
			    scorpio.setText("Scorpio");
			    sagg.setText("Sagitarius");
			    capri.setText("Capricorn");
			    aquar.setText("Aquarius");
			    pisces.setText("Pisces");
			    
	
	  	 }
		 else if(lang.equals("Japanese"))
	  	 {
			 setContentView(R.layout.alllang20);
	  		  aries=(TextView) findViewById(R.id.ariest);
			    taurus=(TextView) findViewById(R.id.taurust);
			    gemini=(TextView) findViewById(R.id.geminit);
			    cancer=(TextView) findViewById(R.id.cancert);
			    leo=(TextView) findViewById(R.id.leot);
			    virgo=(TextView) findViewById(R.id.virgot);
			    libra=(TextView) findViewById(R.id.librat);
			    scorpio=(TextView) findViewById(R.id.scorpt);
			    sagg=(TextView) findViewById(R.id.sagt);
			    capri=(TextView) findViewById(R.id.caprit);
			    aquar=(TextView) findViewById(R.id.aquart);
			    pisces=(TextView) findViewById(R.id.piscest);
			    
			    aries.setText("アリエス");
			    taurus.setText(" 牡牛 ");
			    gemini.setText("ジェミニ");
			    cancer.setText("癌");
			    leo.setText("レオ");
			    virgo.setText("乙女座");
			    libra.setText("天秤座");
			    scorpio.setText("蠍座");
			    sagg.setText("射手座");
			    capri.setText("山羊座");
			    aquar.setText("水瓶座");
			    pisces.setText("魚座");

	  	 }
	  	 else if(lang.equals("Hindi"))
	  	 {
	  		setContentView(R.layout.alllang20);
	  		  aries=(TextView) findViewById(R.id.ariest);
			    taurus=(TextView) findViewById(R.id.taurust);
			    gemini=(TextView) findViewById(R.id.geminit);
			    cancer=(TextView) findViewById(R.id.cancert);
			    leo=(TextView) findViewById(R.id.leot);
			    virgo=(TextView) findViewById(R.id.virgot);
			    libra=(TextView) findViewById(R.id.librat);
			    scorpio=(TextView) findViewById(R.id.scorpt);
			    sagg=(TextView) findViewById(R.id.sagt);
			    capri=(TextView) findViewById(R.id.caprit);
			    aquar=(TextView) findViewById(R.id.aquart);
			    pisces=(TextView) findViewById(R.id.piscest);
			    
			    aries.setText("मेष राशि");
			    taurus.setText("वृषभ");
			    gemini.setText("मिथुन राशि");
			    cancer.setText("कैंसर");
			    leo.setText("लियो");
			    virgo.setText("कन्या");
			    libra.setText("लीब्रा");
			    scorpio.setText("वृश्चिक");
			    sagg.setText("धनुराशि");
			    capri.setText("मकर राशि");
			    aquar.setText("कुंभ राशि");
			    pisces.setText("मीन");
	 	 }
		
		//	mAdview = (AdView) findViewById(R.id.adView);
	    //	mAdview.setAdListener(new ToastAdListener(this));
	    //	mAdview.loadAd(new AdRequest.Builder().build()); 	
	  	 	title=(TextView) findViewById(R.id.title);
			String userAgent = new WebView(daily .this).getSettings().getUserAgentString();
			
	        if (userAgent.contains("Mobile"))
	            {
	        	   title.setVisibility(View.VISIBLE);
	        	   if(lang.equals("French"))
		          	  {
		              	  title.setText("Horoscopes Quotidiens"); 
		           	  }
	        	   else if(lang.equals("Chinese"))
		          	  {
		          		  title.setText("每天的星座运势"); 
		          	  }
		          	  else if(lang.equals("Spanish"))
		          	  {
		            		  title.setText("Horóscopos diarios"); 
		             }
		          	  else if(lang.equals("Dutch"))
		          	  {
		            		  title.setText("Dagelijkse Horoscopen "); 
		              }
		          	  else if(lang.equals("Arabic"))
		          	  {
		          		  title.setText("الأبراج اليومية");
		          	  }
		          	  else if(lang.equals("German"))
		          	  {
		          		  title.setText("Tägliche Horoskope");
		          	  }
		          	  else if(lang.equals("Portuguese"))
		          	  {
		          		  title.setText("Horóscopos Diários");
		          	  }
		          	  else if(lang.equals("Malay"))
		          	  {
		                	  title.setText("Daily Horoskop"); 
		           	  }
		          	  else if(lang.equals("English")) 
		          	  {
		               	  title.setText("Daily Horoscopes"); 
		           	  }
		          	  else if(lang.equals("Hindi")) 
		          	  {
		               	  title.setText(" दैनिक कुंडली"); 
		           	  }
		          	  else if(lang.equals("Japanese")) 
		          	  {
		               	  title.setText("毎日の星占い"); 
		           	  }
		          	else if(lang.equals("Russian")) 
		          	  {
		               	  title.setText("Ежедневные Гороскопы"); 
		           	  }
	       		}
	          else
	           {
	        	  title.setVisibility(View.VISIBLE);
	        	  if(lang.equals("French"))
	          	  {
	              	  title.setText(Html.fromHtml("<h1 align=\"center\"><font color=\"#f72901\">Horoscopes Quotidiens</font></h1>")); 
	           	  }
	          	  else if(lang.equals("Chinese"))
	          	  {
	          		  title.setText(Html.fromHtml("<h1 align=\"center\"><font color=\"#f72901\">每天的星座运势</font></h1>")); 
	          	  }
	          	  else if(lang.equals("Spanish"))
	          	  {
	            		  title.setText(Html.fromHtml("<h1 align=\"center\"><font color=\"#f72901\">Hor&#243;scopos Diarios</font></h1>")); 
	            	  }
	          	  else if(lang.equals("Dutch"))
	          	  {
	            		  title.setText(Html.fromHtml("<h1 align=\"center\"><font color=\"#f72901\">Dagelijkse Horoscopen </font></h1>")); 
	            	  }
	          	  else if(lang.equals("Arabic"))
	          	  {
	          		  title.setText(Html.fromHtml("<h1 align=\"center\"><font color=\"#f72901\">الأبراج اليومية</font></h1>"));
	          	  }
	          	  else if(lang.equals("German"))
	          	  {
	          		  title.setText(Html.fromHtml("<h1 align=\"center\"><font color=\"#f72901\">Tägliche Horoskope</font></h1>"));
	          	  }
	          	  else if(lang.equals("Portuguese"))
	          	  {
	          		  title.setText(Html.fromHtml("<h1 align=\"center\"><font color=\"#f72901\">Horóscopos Diários</font></h1>"));
	          	  }
	          	  else if(lang.equals("Malay"))
	          	  {
	                	  title.setText(Html.fromHtml("<h1 align=\"center\"><font color=\"#f72901\">Daily Horoskop</font></h1>")); 
	           	  }
	          	  else if(lang.equals("English")) 
	          	  {
	               	  title.setText(Html.fromHtml("<h1 align=\"center\"><font color=\"#f72901\">Daily Horoscopes</font></h1>")); 
	           	  }
	          	  else if(lang.equals("Hindi")) 
	          	  {
	               	  title.setText(Html.fromHtml("<h1 align=\"center\"><font color=\"#f72901\"> दैनिक कुंडली</font></h1>")); 
	           	  }
	          	  else if(lang.equals("Japanese")) 
	          	  {
	               	  title.setText(Html.fromHtml("<h1 align=\"center\"><font color=\"#f72901\">毎日の星占い</font></h1>")); 
	           	  }
	          	else if(lang.equals("Russian")) 
	          	  {
	               	  title.setText(Html.fromHtml("<h1 align=\"center\"><font color=\"#f72901\">Ежедневные Гороскопы </font></h1>")); 
	           	  }
	           }
	        
	       
	        
	         ImageView img = (ImageView) findViewById(R.id.image2015);
			 img.setOnClickListener(new View.OnClickListener() {
				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					Intent intent = new Intent(daily.this,daily1.class);
					intent.putExtra("key", "Aries");
					intent.putExtra("language", lang);
				   startActivity(intent);       
				}
			});
		 	 ImageView img2 = (ImageView) findViewById(R.id.imageView2);
				img2.setOnClickListener(new View.OnClickListener() {
					
					@Override
					public void onClick(View v) {
						// TODO Auto-generated method stub
						Intent intent = new Intent(daily.this,daily1.class);
						intent.putExtra("key", "Taurus");
						intent.putExtra("language", lang);
				        startActivity(intent);
					}
				});
		 		ImageView img3 = (ImageView) findViewById(R.id.imageView3);
				img3.setOnClickListener(new View.OnClickListener() {
					@Override
					public void onClick(View v) {
						// TODO Auto-generated method stub
						Intent intent = new Intent(daily.this,daily1.class);
						intent.putExtra("key", "Gemini");
						intent.putExtra("language", lang);
				         startActivity(intent);
		 			}
				});
				ImageView img4 = (ImageView) findViewById(R.id.imageView4);
				img4.setOnClickListener(new View.OnClickListener() {
					@Override
					public void onClick(View v) {
						// TODO Auto-generated method stub
						Intent intent = new Intent(daily.this,daily1.class);
						intent.putExtra("key", "Cancer");
						intent.putExtra("language", lang);
				          startActivity(intent);
		 		}
				});
				ImageView img5 = (ImageView) findViewById(R.id.imageView5);
				img5.setOnClickListener(new View.OnClickListener() {
					@Override
					public void onClick(View v) {
						// TODO Auto-generated method stub
						Intent intent = new Intent(daily.this,daily1.class);
						intent.putExtra("key", "Leo");
						intent.putExtra("language", lang);
				         startActivity(intent);
		 			}
				});
				ImageView img6 = (ImageView) findViewById(R.id.imageView6);
				img6.setOnClickListener(new View.OnClickListener() {
					@Override
					public void onClick(View v) {
						// TODO Auto-generated method stub
						Intent intent = new Intent(daily.this,daily1.class);
						intent.putExtra("key", "Virgo");
						intent.putExtra("language", lang);
			            startActivity(intent);
			 		}
				});
				
				ImageView img7 = (ImageView) findViewById(R.id.imageView7);
				img7.setOnClickListener(new View.OnClickListener() {
					@Override
					public void onClick(View v) {
						// TODO Auto-generated method stub
						Intent intent = new Intent(daily.this,daily1.class);
						intent.putExtra("key", "Libra");
						intent.putExtra("language", lang);
				          startActivity(intent);
					}
				});
				
				ImageView img8 = (ImageView) findViewById(R.id.imageView8);
				img8.setOnClickListener(new View.OnClickListener() {
					@Override
					public void onClick(View v) {
						// TODO Auto-generated method stub
						Intent intent = new Intent(daily.this,daily1.class);
						intent.putExtra("key", "Scorpio");
						intent.putExtra("language", lang);
			             startActivity(intent);
			    	}
				});
				ImageView img9 = (ImageView) findViewById(R.id.imageView9);
				img9.setOnClickListener(new View.OnClickListener() {
					@Override
					public void onClick(View v) {
						// TODO Auto-generated method stub
						Intent intent = new Intent(daily.this,daily1.class);
						intent.putExtra("key", "Sagittarius");
						intent.putExtra("language", lang);
			             startActivity(intent);
			 		}
				});
		 		ImageView img10 = (ImageView) findViewById(R.id.imageView10);
				img10.setOnClickListener(new View.OnClickListener() {
					@Override
					public void onClick(View v) {
						// TODO Auto-generated method stub
						Intent intent = new Intent(daily.this,daily1.class);
						intent.putExtra("key", "Capricorn");
						intent.putExtra("language", lang);
				           startActivity(intent);
			 		}
				});
	 			ImageView img11 = (ImageView) findViewById(R.id.imageView11);
				img11.setOnClickListener(new View.OnClickListener() {
					@Override
					public void onClick(View v) {
						// TODO Auto-generated method stub
						Intent intent = new Intent(daily.this,daily1.class);
						intent.putExtra("key", "Aquarius");
						intent.putExtra("language", lang);
			            startActivity(intent);       
					}
				});
				
				ImageView img12 = (ImageView) findViewById(R.id.imageView12);
				img12.setOnClickListener(new View.OnClickListener() {
					@Override
					public void onClick(View v) {
						// TODO Auto-generated method stub
						Intent intent = new Intent(daily.this,daily1.class);
						intent.putExtra("key", "Pisces");
						intent.putExtra("language", lang);
			             startActivity(intent);
					}
				});
		if(lang.equals("Chinese") || lang.equals("Russian") || lang.equals("Japanese") || lang.equals("Arabic") || lang.equals("German") || lang.equals("Portuguese") || lang.equals("Malay") || lang.equals("Hindi"))
		{
			aries.setOnClickListener(new View.OnClickListener() {
 				
 				@Override
 				public void onClick(View v) {
 					// TODO Auto-generated method stub
 					Intent intent = new Intent(daily.this,daily1.class);
					intent.putExtra("key", "Aries");
					intent.putExtra("language", lang);
				   startActivity(intent); 
 				}
 			});
			taurus.setOnClickListener(new View.OnClickListener() {
 				
 				@Override
 				public void onClick(View v) {
 					// TODO Auto-generated method stub
 					Intent intent = new Intent(daily.this,daily1.class);
					intent.putExtra("key", "Taurus");
					intent.putExtra("language", lang);
			        startActivity(intent);
 				}
 			});
			
			gemini.setOnClickListener(new View.OnClickListener() {
	 			
	 			@Override
	 			public void onClick(View v) {
	 				// TODO Auto-generated method stub
	 				Intent intent = new Intent(daily.this,daily1.class);
					intent.putExtra("key", "Gemini");
					intent.putExtra("language", lang);
			         startActivity(intent);
	   		}
	 		});
			cancer.setOnClickListener(new View.OnClickListener() {
	 			
	 			@Override
	 			public void onClick(View v) {
	 				// TODO Auto-generated method stub
	 				Intent intent = new Intent(daily.this,daily1.class);
					intent.putExtra("key", "Cancer");
					intent.putExtra("language", lang);
			          startActivity(intent);
	 	
	 			}
	 		});
			leo.setOnClickListener(new View.OnClickListener() {
	 			
	 			@Override
	 			public void onClick(View v) {
	 				// TODO Auto-generated method stub
	 				Intent intent = new Intent(daily.this,daily1.class);
					intent.putExtra("key", "Leo");
					intent.putExtra("language", lang);
			         startActivity(intent);
	 			}
	 		});
			
			virgo.setOnClickListener(new View.OnClickListener() {
	 			
	 			@Override
	 			public void onClick(View v) {
	 				// TODO Auto-generated method stub
	 				Intent intent = new Intent(daily.this,daily1.class);
					intent.putExtra("key", "Virgo");
					intent.putExtra("language", lang);
		            startActivity(intent);
	 			}
	 		});

			libra.setOnClickListener(new View.OnClickListener() {
	 			
	 			@Override
	 			public void onClick(View v) {
	 				// TODO Auto-generated method stub
	 				Intent intent = new Intent(daily.this,daily1.class);
					intent.putExtra("key", "Libra");
					intent.putExtra("language", lang);
			          startActivity(intent);
	 			}
	 		});	
			scorpio.setOnClickListener(new View.OnClickListener() {
	 			
	 			@Override
	 			public void onClick(View v) {
	 				// TODO Auto-generated method stub
	 				Intent intent = new Intent(daily.this,daily1.class);
					intent.putExtra("key", "Scorpio");
					intent.putExtra("language", lang);
		             startActivity(intent);
	 			}
	 		});
			sagg.setOnClickListener(new View.OnClickListener() {
	 			
	 			@Override
	 			public void onClick(View v) {
	 				// TODO Auto-generated method stub
	 				Intent intent = new Intent(daily.this,daily1.class);
					intent.putExtra("key", "Sagittarius");
					intent.putExtra("language", lang);
		             startActivity(intent);
	 			}
	 		});
			capri.setOnClickListener(new View.OnClickListener() {
	 			
	 			@Override
	 			public void onClick(View v) {
	 				// TODO Auto-generated method stub
	 				Intent intent = new Intent(daily.this,daily1.class);
					intent.putExtra("key", "Capricorn");
					intent.putExtra("language", lang);
			           startActivity(intent);
	 			}
	 		});
			
			aquar.setOnClickListener(new View.OnClickListener() {
	 			
	 			@Override
	 			public void onClick(View v) {
	 				// TODO Auto-generated method stub
	 				Intent intent = new Intent(daily.this,daily1.class);
					intent.putExtra("key", "Aquarius");
					intent.putExtra("language", lang);
		            startActivity(intent); 
	 			}
	 		});
			pisces.setOnClickListener(new View.OnClickListener() {
	 			
	 			@Override
	 			public void onClick(View v) {
	 				// TODO Auto-generated method stub
	 				Intent intent = new Intent(daily.this,daily1.class);
					intent.putExtra("key", "Pisces");
					intent.putExtra("language", lang);
		             startActivity(intent);
	 			}
	 		});	
	 		
         }
	 			
	       }	
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		
		
		
		 MenuInflater inflater = getMenuInflater();
		    inflater.inflate(R.menu.custommenu, menu);
		    RelativeLayout layout = (RelativeLayout) menu.findItem(R.id.layout_item).getActionView();
		    View v = getLayoutInflater().inflate(R.layout.ab_bottom_layout, null);
		    
		    final Spinner sp = (Spinner) v.findViewById(R.id.bottomspinner);	 
	 	    
		     sp.setAdapter(new MyAdapter(daily.this, R.layout.spinnernew,
		    		Languages));
		   		 	  
		 	       final AlertDialog.Builder alt_bld = new AlertDialog.Builder(this);
		 	        sp.setOnItemSelectedListener(new OnItemSelectedListener() {
		 	    	   public void onClick(View v) {
		 	    	    // TODO Auto-generated method stub
		 	    	   } 
		 	    	   @Override
		 	    	    public void onItemSelected(AdapterView<?> arg0, View view,
		 	    	            int position, long row_id) {
		 	    		   
		 	    	         switch(position){
		 	    	       
		 	    	                case 1:
		 	    	               
		 	    	                	Intent int_eng = new Intent(daily.this,daily.class);
		 	    	       	    	lang1="English";
		 	    	       	    	int_eng.putExtra("language", lang1);
		 	    	       	    	int_eng.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		 	    	       	    	startActivity(int_eng);
		 	    	       	    	
		 	    	       	    	break;
		 	    	                case 2:
		 	    	                	Intent int_fran=new Intent(daily.this,daily.class);
		 	    	       	    	lang1="French";
		 	    	       	    	int_fran.putExtra("language", lang1);
		 	    	       	      	int_fran.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		 	    	       	    	startActivity(int_fran);
		 			            	break;
		 	    	            case 3:
		 	    	            	Intent int_span=new Intent(daily.this,daily.class);
		 	    	   	    	lang1="Spanish";
		 	    	   	    	int_span.putExtra("language", lang1);
		 	    	   	      	int_span.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		 	    	   	    	startActivity(int_span);
			 			            	break;
		 	    	            case 4:
		 	    	            	Intent int_hind=new Intent(daily.this,daily.class);
		 	    	   	    	lang1="Hindi";
		 	    	   	        int_hind.putExtra("language", lang1);
		 	    	     	   int_hind.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		 	    	   	    	startActivity(int_hind);
			 			            	break;
		 	    	            case 5:
		 	    	            	Intent int_duts=new Intent(daily.this,daily.class);
		 	    	   	    	lang1="Dutch";
		 	    	   	    int_duts.putExtra("language", lang1);
		 	    	     	int_duts.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		 	    	   	    	startActivity(int_duts);
			 			            	break;
		 	    	            case 6:
		 	    	            	Intent int_aras=new Intent(daily.this,daily.class);
		 	    	   	     	lang1="Arabic";
		 	    	   	    int_aras.putExtra("language", lang1);
		 	    	      	int_aras.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		 	    	   	    	startActivity(int_aras);
		 			            	break;
		 	    	           case 7:
		 	    	        	  Intent ini_malay=new Intent(daily.this,daily.class);
		 	    				  lang1="Malay";
		 	    				 ini_malay.putExtra("language", lang1);
		 	    				ini_malay.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		 	    				  startActivity(ini_malay);
		 			            	break;
		 	    	          case 8:
		 	    	        	 Intent int_gerns=new Intent(daily.this,daily.class);
		 	    		    	lang1="German";
		 	    		    	int_gerns.putExtra("language", lang1);
		 	    		    	int_gerns.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		 	    		    	startActivity(int_gerns);
		 			            	break;
		 	    	         case 9:
		 	    	        	Intent int_chi=new Intent(daily.this,daily.class);
		 	    		    	lang1="Chinese";
		 	    		    	int_chi.putExtra("language", lang1);
		 	    		      	int_chi.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		 	    		    	startActivity(int_chi);
		 			            	break;
		 	    	        case 10:
		 	    	        	Intent int_japs=new Intent(daily.this,daily.class);
		 	    		    	lang1="Japanese";
		 	    		    	int_japs.putExtra("language", lang1);
		 	    		    	int_japs.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		 	    		    	startActivity(int_japs);
	 			            	break;
	 			            	
		 	    	       case 11:
		 	    	    	  Intent int_rus=new Intent(daily.this,daily.class);
		 	    		    	lang1="Russian";
		 	    		    	int_rus.putExtra("language", lang1);
		 	    		    	int_rus.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		 	    		    	startActivity(int_rus);
		 	    		    	break;
	 			            	
		 	    	      case 12:
		 	    	    	 Intent ini_portu=new Intent(daily.this,daily.class);
		 	  			  lang1="Portuguese";
		 	  			  ini_portu.putExtra("language", lang1);
		 	  			  ini_portu.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		 	  			  startActivity(ini_portu);
	 			            	break;
		 			         }
		  	    	    }
	  	    	    @Override
		 	    	    public void onNothingSelected(AdapterView<?> arg0) {
		 	    	        // TODO Auto-generated method stub
		 	    	    }
	 	    	   });
		    
		    
		    layout.addView(v); 

		    return super.onCreateOptionsMenu(menu);
		 
 	 	}
	public boolean onOptionsItemSelected(MenuItem item) {
		
	  	  if (item.getItemId() == R.id.exit)
	   		  {
	   			 AlertDialog.Builder builder = new AlertDialog.Builder(this);
	   			    builder.setMessage("Are you sure  want to exit?")
	   			           .setCancelable(false)
	   			           .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
	   			               public void onClick(DialogInterface dialog, int id) {
	   			            	daily.this.finish();
	   			            	   Intent intent = new Intent(Intent.ACTION_MAIN);
	   			   		    	intent.addCategory(Intent.CATEGORY_HOME);
	   			   		    	intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
	   			   		    	startActivity(intent);
	   			               }
	   			           })
	   			           .setNegativeButton("No", new DialogInterface.OnClickListener() {
	   			               public void onClick(DialogInterface dialog, int id) {
	   			                    dialog.cancel();
	   			               }
	   			           });
	   			    AlertDialog alert = builder.create();
	   			    alert.show();
	   		  }
	   		 
	      		  else
	      		  {
	      		  }
	      	          
	      	            return true;
	    }
	public class MyAdapter extends ArrayAdapter {
		 
		public MyAdapter(Context context, int textViewResourceId,
		String[] objects) {
		super(context, textViewResourceId, objects);
		}
		 
		public View getCustomView(int position, View convertView,
		ViewGroup parent) {
		 
		// Inflating the layout for the custom Spinner
		LayoutInflater inflater = getLayoutInflater();
		View layout = inflater.inflate(R.layout.spinnernew, parent, false);
		 
	  	TextView tvLanguage = (TextView) layout
		.findViewById(R.id.spintext);
		 
	 	tvLanguage.setText(Languages[position]);
		 
	 	ImageView img = (ImageView) layout.findViewById(R.id.sspin);
		 
	 	img.setImageResource(images[position]);
		 
	 	if (position == 0) {
	 	img.setVisibility(View.GONE);
	 //	tvLanguage.setTextColor(Color.BLACK);
 	  	}
		 
		return layout;
		}
		 
		// It gets a View that displays in the drop down popup the data at the specified position
		@Override
		public View getDropDownView(int position, View convertView,
		ViewGroup parent) {
		return getCustomView(position, convertView, parent);
		}
		 
		// It gets a View that displays the data at the specified position
		@Override
		public View getView(int position, View convertView, ViewGroup parent) {
		return getCustomView(position, convertView, parent);
		}
		}
}

