Tecnologia do Blogger.
RSS

Re: [androidbrasil-dev] ScrollView can host only one direct child

Adiel tem o layout:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.tapago.android.apps.usuario.RegisterActivity"
style="@style/TaPagoUsuario"
>

<TextView android:text="@string/hello_world" android:layout_width="wrap_content"
android:layout_height="wrap_content" />

</RelativeLayout>

2015-08-14 13:51 GMT-03:00 Adiel Cristo <adielcristo@gmail.com>:
Olá Éderson,

Faltou o layout, activity_register.

2015-08-14 13:36 GMT-03:00 Éderson Sandre <ederson.sandre@gmail.com>:

Então Thiago, o duro que não!


public class RegisterActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_register, menu);
return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();

//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}

return super.onOptionsItemSelected(item);
}
}

Em 14 de agosto de 2015 13:16, Thiago Neves <ttn.passos@gmail.com> escreveu:
Provavelmente nessa Activity que você está chamando deve ter mais de um view como Filho, e só pode ter um filho direto, entendeu ?



Em 14 de agosto de 2015 12:29, Éderson Sandre <ederson.sandre@gmail.com> escreveu:
Boa tarde galera!


Estou tendo dificuldade ao rodar aplicativo em um nova activity, ao criar um nova esta em apresentando o seguinte erro:

java.lang.RuntimeException: Unable to start activity ComponentInfo
Caused by: java.lang.IllegalStateException: ScrollView can host only one direct child

Sendo que nesta nova activity não tem ligação nenhuma com as outras do aplicativo, está no padrão que o sistema me gera de criação.

Atte.,

Adiel Cristo
Mobile Application Developer / Web Developer

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comentários:

Postar um comentário