English 中文(简体)
文本概述中流放的安套3.0
原标题:Text in textview slides down in Android 3.0

I have a RealtiveLayout created in a XML file adjusted for a 480x320 (portrait) view. Everything is created in "dip" units. Basicly it holds 4 textviews that use a quarter of the screen each. They are all positioned by layout_marginLeft and layout_marginTop. The app has a feature that you can tap on any of these 4 textviews to make it large, and the other 3 will decrease in size and align over each other to the left of the view. Tap the large readout again and all 4 will return to their initial size.

所有这一切都对不同的装置和推土进行罚款,但并非如果推土机运行3.0或以上......。

首先,所有直线比额表,因此,我制定了一些法典,计算了与屏幕尺寸相对的体积和体积。 所有这一切都是美丽的,但是,一旦文本重新编号,便会出现安乐施会。 它突然看一看在实际案文之前插入一个空白线,即我只看到我想显示的案文的顶端。

此处是如何界定案文概览。 每一次读者中都有一个透明但书。

<TextView android:id="@+id/out1" 
android:textStyle="bold"
android:typeface="serif"
android:text="@string/Out1_text" 
android:layout_height="80dip" 
android:layout_width="161dip" 
android:layout_marginLeft="54dip"
android:layout_marginTop="57dip"
android:scrollHorizontally="true"
android:gravity="left|top"
android:maxLines="1"
android:background="#7f7f7f"
android:textColor="@android:color/white"/>
<ImageButton android:id="@+id/BigButton1" 
android:background="@drawable/transparent" 
android:layout_marginLeft="54dp" 
android:layout_marginTop="57dp" 
android:layout_width="161dp" 
android:layout_height="80dp"/>

我尝试了不同的脚步,以确保它只是一行案文,我把重心放在了顶上(尽管这并非我所想要的),但同样的事情还在继续。

我将本《法典》对文本意见的大小和字面表示改动:

RelativeLayout.LayoutParams params1 = new RelativeLayout.LayoutParams(NewOut1Width, NewOut1Height);
params1.setMargins(NewOut1X, NewOut1Y, 0, 0);
big1Button.setLayoutParams(params1);
out1_txtView.setLayoutParams(params1);
out1_txtView.setTextSize(NewOut1FontSize);

“珍贵”的意思是,我先说一下例行公事,而一切都看着右心,一度,一度,一度,一度是重读,再回到标准规模(用最初显示所用的相同价值计算,案文概述中一行倒。

是否有任何人cl?

ADDITIONAL INFORMATION I ve tried to add a getLineBounds, and it show that the baseline of the textView increases as the textSize increases, but it doesn t go down again when the textSize decreases. It doesn t matter if I have gravity top, center or bottom.

问题回答

仅审判:

定下案文第5dp和编外语第5-12段。 这就意味着,每一份案文必定会占5dp。 而且,你也急切地需要增加重力,因为你给了女权。 此外,该信将电文的宽度和高度固定值。 引证:

RelativeLayout.LayoutParams relativeLayoutParams = new RelativeLayout.LayoutParams(width, height);
textView.setLayoutParams(relativeLayoutParams);




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签