Ich habe eine Scrollview innerhalb einer Registerkarte auf einem tabLayout. Es gibt eine Textansicht in der Bildlaufansicht, aber wenn ich versuche, nach unten zu scrollen, schneidet die Seite kurz ab und ich kann nicht alle Bildansichten sehen. Wie behebe ich das?Scrollview scrollt nicht innerhalb von tabLayout über einen bestimmten Punkt hinaus. Wie behebe ich das?
Das ist mein XML für die Scroll
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="end">
<TextView
android:padding="@dimen/welcome_text_padding"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="@dimen/welcome_text_size"
android:id="@+id/intro_text"/>
</ScrollView>
</LinearLayout>
Ich weiß, dass hier überflüssig ist Linearlayout, aber das ist nicht das Problem ist es?
Dies ist das Fragment Klasse
package com.example.lucas.guide;
import android.graphics.Typeface;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
public class WelcomeMOBA extends Fragment{
public WelcomeMOBA() {
// Required empty public constructor
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View myInflatedView = inflater.inflate(R.layout.fragment_welcome_moba, container,false);
final TextView introText = (TextView) myInflatedView.findViewById(R.id.intro_text);
introText.setTypeface(Typeface.createFromAsset(getActivity().getAssets(), "HelveticaNeueLight.otf"));
introText.setText("this is text and it exceeds the screenspace");
return myInflatedView;
}
}
Auch hier ist die XML der Klasse, die das obige Fragment enthält.
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="fixed"
app:tabGravity="fill"/>
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
Und schließlich ist hier ein Bild von meinem Problem: Der abgeblendet Bereich blättert in Ordnung, aber wenn ich an den blauen Teil bekommen, ich das Scrollen stoppt und pflegen lassen weiter gehen. Es gibt Text jenseits des Bildschirms.
Nope lösen:/Dies alles nicht tun –