I'm new on this. Just want to show a webpage through WebView, but it
continuously crashing while launching this particular activity. Please help.
Here is my code
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.webkit.WebView;
import android.widget.Button;
public class vistaweb extends AppCompatActivity implements View.OnClickListener {
String url= "https://myschoolserver.com/apps_login.php";
WebView vWeb = (WebView) findViewById(R.id.MyWeb);
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getSupportActionBar().hide();
setContentView(R.layout.activity_vistaweb);
vWeb.clearCache(true);
vWeb.clearHistory();
vWeb.getSettings().setJavaScriptEnabled(true);
// vWeb.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
vWeb.loadUrl(url);
Button back = (Button)findViewById(R.id.back);
Button forward = (Button)findViewById(R.id.forward);
Button reload = (Button)findViewById(R.id.relode);
back.setOnClickListener(this);
forward.setOnClickListener(this);
reload.setOnClickListener(this);
}
#Override
public void onClick(View view) {
switch (view.getId()){
case R.id.back:
vWeb.canGoBack();
break;
case R.id.forward:
vWeb.canGoForward();
break;
case R.id.relode:
vWeb.reload();
break;
}
}
}
And here is my xml file
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.myschoolserver.myschoolserver_beta.vistaweb">
<Button
android:id="#+id/back"
style="#style/Widget.AppCompat.Button.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="3dp"
android:text="BACK"
app:layout_constraintLeft_toLeftOf="parent"
tools:layout_editor_absoluteY="461dp"
android:layout_marginStart="3dp" />
<Button
android:id="#+id/relode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="RELOAD"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
tools:layout_editor_absoluteY="462dp" />
<Button
android:id="#+id/forward"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Forward"
tools:layout_editor_absoluteY="462dp"
android:layout_marginRight="8dp"
app:layout_constraintRight_toRightOf="parent" />
<WebView
android:id="#+id/MyWeb"
android:layout_width="0dp"
android:layout_height="445dp"
android:layout_marginLeft="0dp"
android:layout_marginTop="16dp"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
And while launching I noticed the report bug showing error at line 16 which is
WebView vWeb = (WebView) findViewById(R.id.MyWeb);
Please help. Thanks in advance.
1.You should call findViewById in onCreate method .
2.Because you use vWeb in onClick method .So you should set vWeb as global variable .
3.Don't forget add permission .
<uses-permission android:name="android.permission.INTERNET"/>
4.Set webView.setWebViewClient and webview.setWebChromeClient in your code .
private WebView vWeb;
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getSupportActionBar().hide();
setContentView(R.layout.activity_vistaweb);
vWeb = (WebView) findViewById(R.id.MyWeb);
...
}
Related
I am a new comer to Android app.When I run an app with buttons in it in the emulator, the buttons are shown after the app is completed, so onclick etc is not working.
It shows a blank white screen
This same code is from a youtube video and there it is working fine. Tried to debug but couldnt make much headway.
Pasting the code :
package com.example.weatherapiapp;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
Button btn_cityID,btn_getWeatherByID,btn_getWeatherByName;
EditText et_dataInput;
ListView lv_weatherReport;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//assign values to each control on the layout
btn_cityID = findViewById(R.id.btn_getCityID);
btn_getWeatherByID = findViewById(R.id.btn_getWeatherByCityID);
btn_getWeatherByName = findViewById(R.id.btn_getWeatherByCityName);
et_dataInput = findViewById(R.id.et_dataInput);
lv_weatherReport = findViewById(R.id.lv_weatherReports);
//click listeners for each button
btn_cityID.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
Toast.makeText(MainActivity.this,"You clicked me 1.", Toast.LENGTH_SHORT);
}
});
btn_getWeatherByID.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
Toast.makeText(MainActivity.this,"You clicked me 2.",Toast.LENGTH_SHORT);
}
});
btn_getWeatherByName.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
Toast.makeText(MainActivity.this,"You clicked me 3.",Toast.LENGTH_SHORT);
}
});
}
}
The activity_main.xml is as follows:
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<Button
android:id="#+id/btn_getCityID"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Get City ID"
app:layout_constraintEnd_toStartOf="#id/btn_getWeatherByCityID"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="#+id/btn_getWeatherByCityID"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Weather by ID"
app:layout_constraintEnd_toStartOf="#id/btn_getWeatherByCityName"
app:layout_constraintStart_toEndOf="#+id/btn_getCityID"
app:layout_constraintTop_toTopOf="#id/btn_getCityID" />
<Button
android:id="#+id/btn_getWeatherByCityName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Weather by Name"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="#+id/btn_getWeatherByCityID"
app:layout_constraintTop_toTopOf="#id/btn_getWeatherByCityID" />
<EditText
android:id="#+id/et_dataInput"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:ems="10"
android:hint="City Name"
android:inputType="textPersonName"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/btn_getCityID" />
<ListView
android:id="#+id/lv_weatherReports"
android:layout_width="409dp"
android:layout_height="628dp"
android:layout_marginTop="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/et_dataInput" />
</androidx.constraintlayout.widget.ConstraintLayout>
Can you help in letting me know what may be the issue?
you forgot .show() in toast
it should be
Toast.makeText(getApplicationContext(),"You clicked me 1.", Toast.LENGTH_SHORT).show();
This question already has answers here:
"cannot resolve symbol R" in Android Studio
(100 answers)
Closed 5 years ago.
I'm new to android and saw other people having the same question but the solutions didn't work.
i tried multiple times to clean, sync and build the project after changes but every time is says that it can't resolve R
adding: import nl.test123.R; didn't work because than the next error popsup:Error:attribute 'nl.test123.soundboard:layout_background' not found.
also this didn't work
import android.R
this is the code:"MainActivity.java"
package nl.test123.testsoundboard;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.BottomNavigationView;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
//import nl.test123.R;
public class MainActivity extends AppCompatActivity {
MediaPlayer mysound1;
MediaPlayer mysound2;
MediaPlayer mysound3;
private TextView mTextMessage;
private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
= new BottomNavigationView.OnNavigationItemSelectedListener() {
#Override
public boolean onNavigationItemSelected(#NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.navigation_top:
// mTextMessage.setText(R.string.title_top);
return true;
case R.id.navigation_latest:
// mTextMessage.setText(R.string.title_latest);
return true;
case R.id.navigation_favorite:
// mTextMessage.setText(R.string.title_favorite);
return true;
}
return false;
}
};
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mTextMessage = (TextView) findViewById(R.id.message);
BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
mysound1 = MediaPlayer.create(this, R.raw.bird);
mysound2 = MediaPlayer.create(this, R.raw.bomb);
mysound3 = MediaPlayer.create(this, R.raw.dog);
}
public void sound1(View view){
mysound1.start();
}
public void sound2(View view){
mysound2.start();
}
public void sound3(View view){
mysound3.start();
}
}
can anyone see what i'm doing wrong or forgetting to do.
see the xml below:"activity_main.xml"
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="nl.marvinboontjes.cucumbersoundboard.MainActivity">
<TextView
android:id="#+id/message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="92dp"
android:layout_marginTop="128dp"
android:text="#string/title_home"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="#+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#android:color/holo_blue_light"
android:onClick="Sound1"
android:text="Bird"
tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="16dp"
tools:ignore="MissingConstraints" />
<Button
android:id="#+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="sound2"
android:text="Bomb"
tools:layout_editor_absoluteX="147dp"
tools:layout_editor_absoluteY="16dp"
tools:ignore="MissingConstraints" />
<Button
android:id="#+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onclick="sound3"
android:text="Dog"
tools:layout_editor_absoluteX="269dp"
tools:layout_editor_absoluteY="16dp"
tools:ignore="MissingConstraints" />
<android.support.design.widget.BottomNavigationView
android:id="#+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="?android:attr/windowBackground"
app:layout_background="#color/colorPrimary"
app:itemIconTint="#drawable/nav_item_color_state"
app:itemTextColor="#drawable/nav_item_color_state"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:menu="#menu/navigation" />
</android.support.constraint.ConstraintLayout>
Error images:
picture1
picture2
use yourpackagename.R.
in your case it will be nl.test123.testsoundboard.R
I think you have an error in your layout. BottomNavigationView doesn't have app:layout_background attribute. remove it and rebuild again.
Time just update for first click... If I click next time It doesn't work. Help me... Question end.
Stack overflow want me to type more details. But this question doesn't need more explanation
I don't know what to add I can't type more for this long it still want me to type something to make the code
Java Code :
package com.test.blog.timepicktest;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import java.util.Calendar;
public class MainActivity extends AppCompatActivity {
Calendar c = Calendar.getInstance();
TextView tv;
Button btn;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tv = (TextView) findViewById(R.id.tv);
btn = (Button) findViewById(R.id.btn);
btn.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
tv.setText(c.get(Calendar.HOUR) + ":" + c.get(Calendar.MINUTE) + ":" + c.get(Calendar.SECOND));
}
});
}
}
XML File :
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.adiraimaji.blog.timepicktest.MainActivity">
<TextView
android:layout_width="174dp"
android:layout_height="48dp"
android:gravity="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.268"
tools:layout_editor_absoluteX="82dp"
android:id="#+id/tv"
app:layout_constraintHorizontal_bias="0.501" />
<Button
android:id="#+id/btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"
android:layout_marginTop="8dp"
android:layout_marginRight="8dp"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginLeft="8dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="#+id/tv"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="8dp" />
</android.support.constraint.ConstraintLayout>
c.get() does not update calendar date.
you must use Calendar.getInstance().get(...) when you handle onClick.
I'm trying to make an app where you can add an item to a list using an EditText and a ListView. I was using this website to help because I don't have much android coding experience, but I had to change the code a bit because I'm using two activities instead of one. But my ListView has disappeared, and I don't know why.
Questions.java (the ListView activity)
package com.example.sylvie.dogwise;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import android.widget.ArrayAdapter;
import android.widget.ListView;
public class Questions extends AppCompatActivity {
ListView listview;
String[] ListElements = new String[] {
"Question 1",
"Question 2"
};
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_questions);
Bundle newQuestion = getIntent().getExtras();
if (newQuestion==null){
return;
}
String QuestionName = newQuestion.getString("QuestionName");
listview = (ListView) findViewById(R.id.QuestionsList);
final List<String> ListElementsArrayList = new ArrayList<String>(Arrays.asList(ListElements));
final ArrayAdapter<String> adapter = new ArrayAdapter<String>
(Questions.this, android.R.layout.simple_list_item_1, ListElementsArrayList);
ListElementsArrayList.add(QuestionName);
adapter.notifyDataSetChanged();
}
public void backHomeOnClick(View view){
Intent b = new Intent(this, HomeScreen.class);
startActivity(b);
}
public void askAQuestionOnClick(View view){
Intent i = new Intent(this, AskAQuestion.class);
startActivity(i);
}
}
activity_questions.xml (the ListView activity)
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.sylvie.dogwise.Questions">
<Button
android:id="#+id/qBackButton"
android:layout_width="88dp"
android:layout_height="wrap_content"
android:text="Back"
android:onClick="backHomeOnClick"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent" />
<ListView
android:id="#+id/QuestionsList"
android:layout_width="384dp"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="#+id/qBackButton" />
<Button
android:id="#+id/AskAQuestionButton"
android:layout_width="384dp"
android:layout_height="50dp"
android:layout_marginBottom="0dp"
android:layout_marginLeft="0dp"
android:layout_marginRight="0dp"
android:text="Ask a Question"
android:onClick="askAQuestionOnClick"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
</android.support.constraint.ConstraintLayout>
AskAQuestion.java (the EditText activity)
package com.example.sylvie.dogwise;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
public class AskAQuestion extends AppCompatActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ask_aquestion);
}
public void backQuestionsOnClick(View view){
Intent b = new Intent(this, Questions.class);
startActivity(b);
}
public void okOnClick(View view){
Intent o = new Intent(this, Questions.class);
final EditText QuestionInput = (EditText) findViewById(R.id.editText);
String Question = QuestionInput.getText().toString();
o.putExtra("QuestionName", Question);
startActivity(o);
}
}
activity_ask_aquestion.xml (the EditText activity)
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.sylvie.dogwise.AskAQuestion">
<Button
android:id="#+id/aaqBackButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="0dp"
android:layout_marginTop="0dp"
android:onClick="backQuestionsOnClick"
android:text="Back"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="#+id/editText"
android:layout_width="350dp"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:ems="10"
android:inputType="textPersonName"
android:text="Question"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="100dp" />
<Button
android:id="#+id/okButton"
android:layout_width="100dp"
android:layout_height="50dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="32dp"
android:text="OK"
android:onClick="okOnClick"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="#+id/editText" />
</android.support.constraint.ConstraintLayout>
You need to call listview.setAdapter(adapter)
public class Questions extends AppCompatActivity {
// fields
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// code ...
// no need of notifyDataSetChanged
listview.setAdapter(adapter);
// from this moment on, use adapter.notifyDataSetChanged
// to indicate changes in dataset
}
// other methods
}
this is my first activity, I am trying to insert a banner but I can not really.
I was following this guide https://developers.google.com/mobile-ads-sdk/docs/admob/fundamentals?hl=it#play but I struggle to understand it fully
can anyone give me advice or a guide to follow?
MainActivty
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
public class MainActivity extends ActionBarActivity implements OnClickListener {
Button Episodi, Istruzioni, Sb;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//creazione fullscreen activity
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_main);
//rimozione action bar
if (Build.VERSION.SDK_INT < 11){
getSupportActionBar().hide();
}
Episodi = (Button) findViewById(R.id.episodi);
Istruzioni = (Button) findViewById(R.id.istruzioni);
Sb = (Button) findViewById(R.id.Segnalaci_un_bug);
Episodi.setOnClickListener(this);
Istruzioni.setOnClickListener(this);
Sb.setOnClickListener(this);
}
public void onClick(View v) {
switch(v.getId()){
case R.id.episodi:
Intent stagioni = new Intent(MainActivity.this,StagioniActivity.class);
startActivity(stagioni);
break;
case R.id.istruzioni:
Intent istruzioni = new Intent(MainActivity.this,IstruzioniActivity.class);
startActivity(istruzioni);
break;
case R.id.Segnalaci_un_bug:
Intent segnalabug = new Intent(MainActivity.this,SegnalaBugActivity.class);
startActivity(segnalabug);
break;
}
}
}
MainActivity XML
<?xml version="1.0"?>
<FrameLayout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#0c0c0c"
tools:context="com.example.prova.MainActivity"
tools:ignore="MergeRootFrame" >
<LinearLayout
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:orientation="vertical"
android:layout_gravity="center|top">
<ImageView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="#drawable/homecaceracafe"
android:adjustViewBounds="true"/>
<Button
android:id="#+id/episodi"
android:layout_width="270dp"
android:layout_height="60dp"
android:layout_gravity="center"
android:background="#drawable/bottonehome"
android:text="Episodi"
android:textSize="20sp" />
<Button
android:id="#+id/istruzioni"
android:layout_width="270dp"
android:layout_height="60dp"
android:layout_gravity="center"
android:background="#drawable/bottonehome"
android:text="Istruzioni"
android:textSize="20sp" />
<Button
android:id="#+id/Segnalaci_un_bug"
android:layout_width="270dp"
android:layout_height="60dp"
android:layout_gravity="center"
android:background="#drawable/bottonehome"
android:text="Segnalaci un bug"
android:textSize="20sp" />