From 557ede64960848365d8ea201e7becf8f472339b8 Mon Sep 17 00:00:00 2001 From: Equip de Desenvolupadors de PBE Date: Tue, 11 Dec 2012 09:19:54 +0000 Subject: [PATCH] --- res/layout/main_activity.xml | 23 +++++++++++++++++++++++ res/values/strings.xml | 2 ++ src/com/upc/pbe/upcnews/MainActivity.java | 11 ++++++++++- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/res/layout/main_activity.xml b/res/layout/main_activity.xml index 0544109..0bf571a 100644 --- a/res/layout/main_activity.xml +++ b/res/layout/main_activity.xml @@ -46,4 +46,27 @@ android:layout_marginTop="21dp" android:textAppearance="?android:attr/textAppearanceSmall" /> + + + + \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 7f1500b..9febb11 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -39,5 +39,7 @@ 2 0 + Alerta! Llibreries de Vitamio no instalades! + Alerta! \ No newline at end of file diff --git a/src/com/upc/pbe/upcnews/MainActivity.java b/src/com/upc/pbe/upcnews/MainActivity.java index befbabc..cb058c1 100644 --- a/src/com/upc/pbe/upcnews/MainActivity.java +++ b/src/com/upc/pbe/upcnews/MainActivity.java @@ -13,6 +13,7 @@ import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.widget.ImageButton; +import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; @@ -21,8 +22,9 @@ public class MainActivity extends Activity implements OnClickListener { private final static String TAG = "Main"; private static String html; + private ImageView alerta; private ImageButton buttonDescarrega; - private TextView URLText; + private TextView URLText, alertaText; @Override public void onCreate(Bundle savedInstanceState){ @@ -40,6 +42,13 @@ public class MainActivity extends Activity implements OnClickListener { buttonDescarrega = (ImageButton) findViewById(R.id.button); buttonDescarrega.setOnClickListener(this); updateURL(); + //Mostrem el missatge d'alerta si Vitamio no esta instalat + if(!io.vov.vitamio.LibsChecker.checkVitamioLibs(this)){ + alerta = (ImageView) findViewById(R.id.imageViewAlerta); + alerta.setVisibility(View.VISIBLE); + alertaText = (TextView) findViewById(R.id.textViewAlerta); + alertaText.setVisibility(View.VISIBLE); + } } public void onClick(View v) { -- libgit2 0.22.2