私はすでにソリューションのROMを使用しようとしましたhere私の断片の中のテキストビューをスクロールできないのはなぜですか?
今度はScrollViewになります。 これらの可能性のどちらも私にはテキストをスクロールさせません。
minSDKはバージョン8です。まだAndroid 2.2.1で動作する必要があります。
私も私のbuild.gradleにサポートするライブラリに続い含ま
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.android.support:support-v4:23.4.0'
マイFragmentOne.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
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"
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"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<ScrollView
android:id="@+id/ScrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:text="lorem ipsum .. (500 Words)"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:id="@+id/tvStatus"/>
そして、私のFragmentOne.java:
package com.kaba.apps.apptemplate.fragment;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.text.Html;
import android.text.method.ScrollingMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
public class FragmentOne extends Fragment
{
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Inflate the layout for this fragment
View fragmentView = inflater.inflate(R.layout.fragment_one, container, false);
fragmentView.setBackgroundColor(Color.DKGRAY);
TextView tvStatus = (TextView)fragmentView.findViewById(R.id.tvStatus);
tvStatus.setTextColor(Color.WHITE);
// tvStatus.setText("I am fragment one");
// tvStatus.setMovementMethod(new ScrollingMovementMethod());
return fragmentView;
}
}
私はちょうど私のTextView内のコンテンツをcutted。私はlorem ipsumの2つのサイトを投稿するのが最善の考えではないと思った。 – chris2701
したがって、TextViewは私のS7の画面よりも長くなります。そして、アプリケーションは最大VGA解像度で動作します。それは私がここに求めている理由です、それは十分に大きくてもスクロールしません – chris2701