我有一个设置布局来更改我的外观应用。 我想放置一个SeekBar来更改我应用程序中所有文本的大小。 但是我不知道该怎么做。 如果您指导我,我将不胜感激。
答案 0 :(得分:3)
尝试一下
activity_main.xml
Ticker,Date,Open,High,Low,Close,Adj Close,Volume,
AAC,2018-01-16,9.370000,9.410000,9.000000,9.060000,9.060000,69400
AAC,2018-01-17,9.120000,9.170000,9.000000,9.030000,9.030000,104500
AAC,2018-01-18,9.050000,9.135000,8.980000,8.990000,8.990000,166600
AAC,2018-01-19,9.000000,9.270000,9.000000,9.200000,9.200000,110600
AAC,2018-01-22,9.200000,9.200000,8.940000,9.080000,9.080000,139200
AAC,2018-01-23,9.050000,9.110000,9.000000,9.020000,9.020000,54700
AAC,2018-01-24,9.070000,9.070000,8.910000,8.950000,8.950000,117500
AAC,2018-01-25,9.000000,9.060000,8.900000,9.050000,9.050000,204300
AAC,2018-01-26,9.110000,9.240000,9.090000,9.170000,9.170000,62000
AAC,2018-01-29,9.170000,9.780000,9.170000,9.500000,9.500000,173300
AAC,2018-01-30,9.400000,9.480000,9.000000,9.080000,9.080000,82800
AAC,2018-01-31,9.080000,9.250000,8.820000,8.950000,8.950000,122000
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:gravity="center"
android:orientation="vertical"
tools:context=".MainActivity">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:text="Text" />
<SeekBar
android:id="@+id/seekBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp" />
</LinearLayout>
类的 onCreateMethod
:
MainActivity
尝试根据自己的喜好修改此代码。