title: I want to scroll down to Specific element using appium in Android, java client v-5.0.4 and appium v-1.7.1
body: <p>I am trying to scroll down to an element, looked and searched everywhere and no code is helping to scroll down, i have tried with the code below which seems to be not working, anyone gives me the solution to scroll down perfectly.
  As swipe and scrollTo functions are depreciated in the latest java client version, a perfect code will help me to solve my TASK</p>
  
  <pre><code>package mobileapp.com.example;
  
  import java.net.MalformedURLException;
  import java.net.URL;
  import org.openqa.selenium.By;
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.remote.DesiredCapabilities;
  import org.testng.annotations.AfterTest;
  import org.testng.annotations.BeforeTest;
  import org.testng.annotations.Test;
  
  import io.appium.java_client.android.AndroidDriver;
  import io.appium.java_client.pagefactory.AndroidFindBy;
  
  public class Day5 {
  
      AndroidDriver&lt;WebElement&gt; driver;
  
      @AndroidFindBy (uiAutomator = "new UiScrollable(new UiSelector()).scrollIntoView(new UiSelector().textContains(\"PHP\"))")
      public WebElement scrollStepOne;
  
      @BeforeTest
      public void setup() throws MalformedURLException {
      DesiredCapabilities capabilities = new DesiredCapabilities();
      capabilities.setCapability("BROWSER_NAME", "Android");
      capabilities.setCapability("VERSION", "6.0.1");
      capabilities.setCapability("deviceName","Nexus 5");
      capabilities.setCapability("platformName","Android");
      capabilities.setCapability("appPackage", "com.vector.guru99");
      capabilities.setCapability("appActivity","com.vector.guru99.BaseActivity");
  
      driver= new AndroidDriver&lt;WebElement&gt;(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
  
      }
  
      @Test
      public void StartTest() throws InterruptedException {
  
          //Verify Homepage
          if(driver.findElement(By.id("android:id/action_bar_title")).isDisplayed())
              System.out.println("Home page is displayed");
          else
              System.out.println("Home page is not displayed");
  
          //step2 - click on Course List tab
  
          driver.findElement(By.name("Course List")).click();
          System.out.println("Courses list are : ");
          Thread.sleep(3000);
  
          //Step 3 - darg until PHP course found and click on it
          scrollStepOne.click();
          Thread.sleep(3000);
  //      driver.findElement(By.xpath("//android.widget.TextView[@text()='PHP']")).click();
  //      Thread.sleep(3333);
  
          //Step 4 - Click on lesson 1 and verify
          driver.findElement(By.xpath("//android.widget.TextView[@text='What is PHP? Write your first PHP Program']")).click();
          Thread.sleep(3333);
  
          if(driver.findElement(By.id("com.vector.guru99:id/lesson_title")).isDisplayed())
              System.out.println("First Lesson is displayed");
          else
              System.out.println("First lesson not opened");
  
  
      }
  
      @AfterTest
      public void tearDown() {
          driver.quit();
      }
  
  }
  </code></pre>