title: How to implement page sliding for Harmony OS?
body: <p>How can I implement page sliding for GridView items in Harmony OS(JAVA)?
  Here's a sample of my code.</p>
  <pre><code>public class GridView extends TableLayout {
      public GridView(Context context) {
          super(context);
      }
  
      public GridView(Context context, AttrSet attrSet) {
          super(context, attrSet);
      }
  
      public GridView(Context context, AttrSet attrSet, String styleName) {
          super(context, attrSet, styleName);
      }
  
      void setAdapter(GridAdapter adapter, LongClickedListener longClickedListener) {
          removeAllComponents();
          for (int i = 0; i &lt; adapter.getComponentList().size(); i++) {
              adapter.getComponentList().get(i).setLongClickedListener(longClickedListener);
              addComponent(adapter.getComponentList().get(i));
          }
      }
  }
  </code></pre>