NestedScrollView Crash Android -


this question has answer here:

trying coding in android. why program crash when add textview xml file?

<?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.nestedscrollview     xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     xmlns:app="http://schemas.android.com/apk/res-auto"     app:layout_behavior="@string/appbar_scrolling_view_behavior"     tools:showin="@layout/activity_comp_analysis"     android:layout_width="match_parent"     android:layout_height="match_parent"     tools:context="com.example.oscarorellana.physicscalaculators.math.companalysis">           <textview         android:layout_width="match_parent"         android:layout_height="50dp"         android:text="enter complex number below"         android:textsize="20dp"         android:textstyle="bold"         />          <textview             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:text="test"             /> </android.support.v4.widget.nestedscrollview> 

the xml file content file in 1 of android activities.probaly basic, can't find mistake.

nestedscrollview should have 1 direct child. add new linear/relative layout container or textviews.

try this:

<nestedscrollview>     <linearlayout>          <textview>          <textview>     <linearlayout> <nestedscrollview> 

update xml below:

<?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.nestedscrollview     xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     xmlns:app="http://schemas.android.com/apk/res-auto"     app:layout_behavior="@string/appbar_scrolling_view_behavior"     tools:showin="@layout/activity_comp_analysis"     android:layout_width="match_parent"     android:layout_height="match_parent"     tools:context="com.example.oscarorellana.physicscalaculators.math.companalysis">      <linearlayout         android:orientation="vertical"          android:layout_width="match_parent"         android:layout_height="match_parent">          <textview             android:layout_width="match_parent"             android:layout_height="50dp"             android:text="enter complex number below"             android:textsize="20dp"             android:textstyle="bold" />          <textview             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:text="test" />     </linearlayout>  </android.support.v4.widget.nestedscrollview> 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -