小编Sal*_*man的帖子

Opengl Android 中的可移动文本

如何使用 Open GL 在 Android 中显示可移动文本?或者是他们以任何其他方式显示文本移动而没有任何混蛋。我尝试过 Android 动画和选取框,但它并没有减少混蛋。我需要在单行上移动的文本像新闻标题一样从右进入并从左向外移动。在 Open GL 中,我应该在渲染器中做什么??

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    touchStart = new PointF();
    objs = new GLSurfaceView(this);
    sqobj = new  rendsquare();
    objs.setRenderer(sqobj);
    setContentView(objs);


    TextView editBox = new TextView(getApplicationContext());
    editBox.setTextColor(Color.BLUE);
    editBox.setEllipsize(TruncateAt.MARQUEE);
    editBox.setMarqueeRepeatLimit(-1);
    editBox.setHorizontallyScrolling(true);
    editBox.setFocusable(true);
    editBox.setFocusableInTouchMode(true);

    editBox.setText("Hello GL testing 123 hello hello h r u i am fine hello u there hello! hello !! !! !! !!");

    addContentView(editBox, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
}
Run Code Online (Sandbox Code Playgroud)

//另一个

public class SquaropnglActivity extends Activity {

private rendsquare sqobj;
private PointF …
Run Code Online (Sandbox Code Playgroud)

android opengl-es

5
推荐指数
1
解决办法
849
查看次数

标签 统计

android ×1

opengl-es ×1