i have this code for creating a marquee, can i change the speed of it and its start position when activated? I have these codes written and when i click the button it starts the marquee on the center.
<TextView
android:id="@+id/mywidget"
android:layout_width="fill_parent"
android:textSize="20dp"
android:layout_height="wrap_content"
android:text="This is a test of marquee on the text view in android."
android:ellipsize="marquee"
android:scrollHorizontally="true"
android:singleLine="true"
android:focusable="false"
android:marqueeRepeatLimit="marquee_forever"
android:textStyle="bold"
android:shadowColor="#f5067e"
android:textColor="#ff000d"
android:shadowDx="0.0"
android:shadowDy="0.0"
android:shadowRadius="8"
/>
MainActivity.java
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView = (TextView) findViewById(R.id.mywidget);
textView.setVisibility(View.INVISIBLE);
anim = (Button) findViewById(R.id.anim);
anim.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
textView.setVisibility(View.VISIBLE);
textView.setSelected(true);
}
});
}