0

This is my xml file

    <?xml version="1.0" encoding="utf-8"?>
    <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".MainActivity">
    
    
        <TextView
            android:text="WELCOME TO PATTAM ONLINE STORE"
            android:id="@+id/textView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="5dp"
            android:focusable="true"
            android:focusableInTouchMode="true"
            android:scrollHorizontally="true"
            android:maxLines="1"
            android:freezesText="true"
            android:ellipsize="marquee"
            android:marqueeRepeatLimit="marquee_forever"
    
            android:textColor="@color/black"
            app:layout_constraintBottom_toTopOf="@+id/framelayout"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="0.0" />
    
        <FrameLayout
            android:id="@+id/framelayout"
            android:layout_width="410dp"
            android:layout_height="631dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.0"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="0.44"
            tools:ignore="MissingConstraints">
    
        </FrameLayout>
    
        <com.google.android.material.bottomnavigation.BottomNavigationView
            android:id="@+id/bottom_navigation"
            style="@style/Widget.MaterialComponents.BottomNavigationView.Colored"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:itemIconTint="@color/black"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="1.0"
            app:menu="@menu/bottom_nav" />
    </androidx.constraintlayout.widget.ConstraintLayout>

And I have included

TextView txtMarquee; 
@Override protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState); 
setContentView(R.layout.activity_main); 
txtMarquee=findViewById(R.id.textView); 
txtMarquee.setSelected(true);
------------------------------------------------------------------------
Dr Mido
  • 2,414
  • 4
  • 32
  • 72
uthai
  • 1

0 Answers0