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) {