Android系统。当扩展TextView属性singleLine为true时会破坏画布绘制

时间:2016-03-21 13:25:56

标签: android canvas textview drawing

我的类扩展了TextView类。

我尝试使用代码

在onDraw方法中绘制路径
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];

NSString *videoURL = [NSString stringWithFormat:@"%@",[prefs objectForKey:@"videoURL"]];
[self.moviePlayer setContentURL:[NSURL URLWithString:videoURL]];
[ self.moviePlayer prepareToPlay];
[ self.moviePlayer.view setFrame: self.view.bounds];
[self.view addSubview:self.moviePlayer.view];
self.moviePlayer.scalingMode = MPMovieScalingModeNone;
[self.view addSubview:self.moviePlayer.view];
 self.moviePlayer.controlStyle = MPMovieControlStyleEmbedded;
[self.moviePlayer setFullscreen:YES animated:YES];
[self.moviePlayer play];

但是,然后我将TextView singleLine的属性作为真正的绘制,但如果它是假的 - 所有的好工作。画弧线,为什么?

1 个答案:

答案 0 :(得分:0)

尝试

android:maxLines="1"

代替单线通话