I'm trying to make an activity of a project of mine contain a considerable amount of components.
I tried doing this using a ScrollingActivity that contained more than just the "default" textView (the one that already comes when it is created), but I discovered that it is not possible, at least as far as I know.
My activity basically contains this template:
Butasyoumightimagine,itdoesnotcontainjustthesetwoquestions.
IalsotriedaScrollView,butIshouldnothavedonethesameinthecorrectwayoritsimplyhasalimitationofnotbeingableto"exceed" the layout limit.
I would like to know how to put all this in activity:
WiththeimageIwantedtoexpressthatthecontentIwanttoaddgoesbeyondit,tothepointthatIwasnotabletouseaScrollView.
Imadeacodetemplate(onlywiththefirsttwobuttons,questionsandanswers)incaseitisusefulforabetterunderstandingand/orresponse:
MainActivity:
package genesysgeneration.chinterative;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity implements View.OnClickListener{
private Button btnSim01, btnSim02, btnNao01, btnNao02;
private TextView tvPergunta01, tvPergunta02, tvResposta01, tvResposta02;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
btnSim01=(Button)findViewById(R.id.btnSim01);
btnSim02=(Button)findViewById(R.id.btnSim02);
btnNao01=(Button)findViewById(R.id.btnNao01);
btnNao02=(Button)findViewById(R.id.btnNao02);
tvPergunta01=(TextView)findViewById(R.id.tvPergunta01);
tvPergunta02=(TextView)findViewById(R.id.tvPergunta02);
tvResposta01=(TextView)findViewById(R.id.tvResposta01);
tvResposta02=(TextView)findViewById(R.id.tvResposta02);
}
public void onClick(View v){
switch (v.getId()){
case R.id.btnSim01:
break;
case R.id.btnNao01:
break;
case R.id.btnSim02:
break;
case R.id.btnNao02:
break;
}
}
}