diff --git a/entry/src/main/java/link/fls/swipestacksample/snackbar/SnackBar.java b/entry/src/main/java/link/fls/swipestacksample/snackbar/SnackBar.java index 123569d9d7912c8a575ab1ec61cf4b0951775d16..e937e565466d5276308dc46cbb16e94d30027a32 100644 --- a/entry/src/main/java/link/fls/swipestacksample/snackbar/SnackBar.java +++ b/entry/src/main/java/link/fls/swipestacksample/snackbar/SnackBar.java @@ -27,12 +27,8 @@ import ohos.agp.components.Text; import ohos.agp.text.Font; import ohos.agp.utils.Color; import ohos.app.Context; -import ohos.global.resource.NotExistException; -import ohos.global.resource.WrongTypeException; import ohos.utils.Sequenceable; -import java.io.IOException; - /** * SnackBar * @@ -169,20 +165,6 @@ public class SnackBar { return this; } - /** - * Sets the message to display on the SnackBar - * - * @param messageId the resource id of the string to display - * @return this builder - * @throws NotExistException NotExistException - * @throws WrongTypeException WrongTypeException - * @throws IOException IOException - */ - public Builder withMessageId(int messageId) throws NotExistException, WrongTypeException, IOException { - mMessage = mContext.getResourceManager().getSolidXml(messageId).getRoot().getStringValue(); - return this; - } - /** * Sets the message to display as the action message * @@ -194,22 +176,6 @@ public class SnackBar { return this; } - /** - * Sets the message to display as the action message - * - * @param actionMessageResId the resource id of the string to display - * @return this builder - * @throws NotExistException NotExistException - * @throws WrongTypeException WrongTypeException - * @throws IOException IOException - */ - public Builder withActionMessageId(int actionMessageResId) throws NotExistException, WrongTypeException, IOException { - if (actionMessageResId > 0) { - mActionMessage = mContext.getResourceManager().getSolidXml(actionMessageResId).getRoot().getStringValue(); - } - return this; - } - /** * Sets the action icon * @@ -254,20 +220,6 @@ public class SnackBar { return this; } - /** - * withTextColorId - * - * @param colorId - * @return this - * @throws NotExistException - * @throws WrongTypeException - * @throws IOException - */ - public Builder withTextColorId(int colorId) throws NotExistException, WrongTypeException, IOException { - mTextColor = colorId; - return this; - } - /** * withBackgroundColorId * diff --git a/library/src/main/java/link/fls/swipestack/SwipeDirectionalView.java b/library/src/main/java/link/fls/swipestack/SwipeDirectionalView.java index 086550cf9a575bfbaae84c430f1a54ab04a5613b..8bdba30ae3e0b386a0062a47eae97b1f8db15803 100644 --- a/library/src/main/java/link/fls/swipestack/SwipeDirectionalView.java +++ b/library/src/main/java/link/fls/swipestack/SwipeDirectionalView.java @@ -454,6 +454,7 @@ public class SwipeDirectionalView extends StackLayout implements ICardState { * Called when a view has been dismissed to the left. * * @param position The position of the view in the adapter currently in use. + * @param text text */ void onViewSwipedToLeft(int position, String text); @@ -461,6 +462,7 @@ public class SwipeDirectionalView extends StackLayout implements ICardState { * Called when a view has been dismissed to the right. * * @param position The position of the view in the adapter currently in use. + * @param text text */ void onViewSwipedToRight(int position, String text);