[go: nahoru, domu]

Change the name of new API to follow android name convention.

bug: 117931537

Test: test in Mojava use support car demo application
Change-Id: Ib8d924e6ce497ce208e687b5d86437444b9a6cc3
diff --git a/car/core/api/1.0.0-alpha6.txt b/car/core/api/1.0.0-alpha6.txt
index 4f70a10..962b3e2 100644
--- a/car/core/api/1.0.0-alpha6.txt
+++ b/car/core/api/1.0.0-alpha6.txt
@@ -337,10 +337,10 @@
     method public int getPage(int);
     method public androidx.recyclerview.widget.RecyclerView getRecyclerView();
     method public int getRowsPerPage();
-    method public boolean getShowScrollBarThumb();
     method public void hideAlphaJump();
     method public boolean isAtEnd();
     method public boolean isAtStart();
+    method public boolean isScrollbarThumbEnabled();
     method public void onLayout(boolean, int, int, int, int);
     method public void onRestoreInstanceState(android.os.Parcelable);
     method public android.os.Parcelable onSaveInstanceState();
@@ -364,7 +364,7 @@
     method public void setOnScrollListener(androidx.car.widget.PagedListView.OnScrollListener);
     method public void setScrollBarContainerWidth(int);
     method public void setScrollBarTopMargin(int);
-    method public void setShowScrollBarThumb(boolean);
+    method public void setScrollbarThumbEnabled(boolean);
     method public void setUpButtonIcon(android.graphics.drawable.Drawable);
     method public void snapToPosition(int);
     field public static final int DEFAULT_MAX_CLICKS = 6; // 0x6
@@ -405,9 +405,9 @@
     ctor public PagedScrollBarView(android.content.Context, android.util.AttributeSet);
     ctor public PagedScrollBarView(android.content.Context, android.util.AttributeSet, int);
     ctor public PagedScrollBarView(android.content.Context, android.util.AttributeSet, int, int);
-    method public boolean getShowScrollBarThumb();
     method public boolean isDownEnabled();
     method public boolean isDownPressed();
+    method public boolean isScrollbarThumbEnabled();
     method public boolean isUpPressed();
     method public void onLayout(boolean, int, int, int, int);
     method public void setButtonRippleBackground(int);
@@ -417,7 +417,7 @@
     method public void setPaginationListener(androidx.car.widget.PagedScrollBarView.PaginationListener);
     method public void setParameters(int, int, int, boolean);
     method public void setScrollbarThumbColor(int);
-    method public void setShowScrollBarThumb(boolean);
+    method public void setScrollbarThumbEnabled(boolean);
     method public void setUpButtonIcon(android.graphics.drawable.Drawable);
     method public void setUpEnabled(boolean);
   }
diff --git a/car/core/api/current.txt b/car/core/api/current.txt
index 4f70a10..962b3e2 100644
--- a/car/core/api/current.txt
+++ b/car/core/api/current.txt
@@ -337,10 +337,10 @@
     method public int getPage(int);
     method public androidx.recyclerview.widget.RecyclerView getRecyclerView();
     method public int getRowsPerPage();
-    method public boolean getShowScrollBarThumb();
     method public void hideAlphaJump();
     method public boolean isAtEnd();
     method public boolean isAtStart();
+    method public boolean isScrollbarThumbEnabled();
     method public void onLayout(boolean, int, int, int, int);
     method public void onRestoreInstanceState(android.os.Parcelable);
     method public android.os.Parcelable onSaveInstanceState();
@@ -364,7 +364,7 @@
     method public void setOnScrollListener(androidx.car.widget.PagedListView.OnScrollListener);
     method public void setScrollBarContainerWidth(int);
     method public void setScrollBarTopMargin(int);
-    method public void setShowScrollBarThumb(boolean);
+    method public void setScrollbarThumbEnabled(boolean);
     method public void setUpButtonIcon(android.graphics.drawable.Drawable);
     method public void snapToPosition(int);
     field public static final int DEFAULT_MAX_CLICKS = 6; // 0x6
@@ -405,9 +405,9 @@
     ctor public PagedScrollBarView(android.content.Context, android.util.AttributeSet);
     ctor public PagedScrollBarView(android.content.Context, android.util.AttributeSet, int);
     ctor public PagedScrollBarView(android.content.Context, android.util.AttributeSet, int, int);
-    method public boolean getShowScrollBarThumb();
     method public boolean isDownEnabled();
     method public boolean isDownPressed();
+    method public boolean isScrollbarThumbEnabled();
     method public boolean isUpPressed();
     method public void onLayout(boolean, int, int, int, int);
     method public void setButtonRippleBackground(int);
@@ -417,7 +417,7 @@
     method public void setPaginationListener(androidx.car.widget.PagedScrollBarView.PaginationListener);
     method public void setParameters(int, int, int, boolean);
     method public void setScrollbarThumbColor(int);
-    method public void setShowScrollBarThumb(boolean);
+    method public void setScrollbarThumbEnabled(boolean);
     method public void setUpButtonIcon(android.graphics.drawable.Drawable);
     method public void setUpEnabled(boolean);
   }
diff --git a/car/core/src/androidTest/java/androidx/car/widget/PagedListViewTest.java b/car/core/src/androidTest/java/androidx/car/widget/PagedListViewTest.java
index 88027d8..609e861 100644
--- a/car/core/src/androidTest/java/androidx/car/widget/PagedListViewTest.java
+++ b/car/core/src/androidTest/java/androidx/car/widget/PagedListViewTest.java
@@ -359,7 +359,7 @@
     public void testScrollBarThumbIsHidden() {
         // Just need enough items to ensure the scroll bar is showing.
         setUpPagedListView(ITEMS_PER_PAGE * 10);
-        mPagedListView.setShowScrollBarThumb(false);
+        mPagedListView.setScrollbarThumbEnabled(false);
         onView(withId(R.id.scrollbar_thumb)).check(matches(not(isDisplayed())));
     }
 
diff --git a/car/core/src/main/java/androidx/car/widget/PagedListView.java b/car/core/src/main/java/androidx/car/widget/PagedListView.java
index 4cf9ab4..10ffded 100644
--- a/car/core/src/main/java/androidx/car/widget/PagedListView.java
+++ b/car/core/src/main/java/androidx/car/widget/PagedListView.java
@@ -468,15 +468,15 @@
      *
      * @param show Whether to show the scrollbar thumb or not.
      */
-    public void setShowScrollBarThumb(boolean show) {
-        mScrollBarView.setShowScrollBarThumb(show);
+    public void setScrollbarThumbEnabled(boolean show) {
+        mScrollBarView.setScrollbarThumbEnabled(show);
     }
 
     /**
      * Returns {@code true} if the scroll bar thumb is visible
      */
-    public boolean getShowScrollBarThumb() {
-        return mScrollBarView.getShowScrollBarThumb();
+    public boolean isScrollbarThumbEnabled() {
+        return mScrollBarView.isScrollbarThumbEnabled();
     }
 
     /**
diff --git a/car/core/src/main/java/androidx/car/widget/PagedScrollBarView.java b/car/core/src/main/java/androidx/car/widget/PagedScrollBarView.java
index 60c8275..f33b8f7 100644
--- a/car/core/src/main/java/androidx/car/widget/PagedScrollBarView.java
+++ b/car/core/src/main/java/androidx/car/widget/PagedScrollBarView.java
@@ -116,7 +116,7 @@
                 defStyleAttrs, defStyleRes);
 
         mShowScrollBarThumb = a.getBoolean(R.styleable.PagedScrollBarView_showScrollBarThumb, true);
-        setShowScrollBarThumb(mShowScrollBarThumb);
+        setScrollbarThumbEnabled(mShowScrollBarThumb);
         Drawable upButtonIcon = a.getDrawable(R.styleable.PagedScrollBarView_upButtonIcon);
         if (upButtonIcon != null) {
             setUpButtonIcon(upButtonIcon);
@@ -182,7 +182,7 @@
     }
 
     /** Returns {@code true} if the scroll bar thumb is visible */
-    public boolean getShowScrollBarThumb() {
+    public boolean isScrollbarThumbEnabled() {
         return mShowScrollBarThumb;
     }
     /**
@@ -190,7 +190,7 @@
      *
      * @param show {@code true} if the scroll bar thumb is visible.
      */
-    public void setShowScrollBarThumb(boolean show) {
+    public void setScrollbarThumbEnabled(boolean show) {
         mShowScrollBarThumb = show;
         mScrollThumb.setVisibility(mShowScrollBarThumb ? View.VISIBLE : View.GONE);
     }