summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBilal Alsharifi <bilal.alsharifi@gmail.com>2019-07-17 11:17:48 -0400
committerBilal Alsharifi <bilal.alsharifi@gmail.com>2019-07-17 11:17:48 -0400
commit7b8e555208faf7a5e569e4513e680739a54be8cc (patch)
treeccbe4ce27e6140d67dfc0f85e1dc732807ba2d62
parent31c5b1f78b5f90c6f18a8df76b462d4752ab040d (diff)
downloadsdl_android-7b8e555208faf7a5e569e4513e680739a54be8cc.tar.gz
Add AutoCompleteList to KeyboardProperties
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/KeyboardProperties.java88
1 files changed, 57 insertions, 31 deletions
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/KeyboardProperties.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/KeyboardProperties.java
index 6ceada6a5..3ef349f73 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/KeyboardProperties.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/KeyboardProperties.java
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/*
+ * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
package com.smartdevicelink.proxy.rpc;
import com.smartdevicelink.proxy.RPCStruct;
@@ -93,6 +93,13 @@ import java.util.List;
* <td>maxlength = 1000 </td>
* <td>Allows an app to prepopulate the text field with a suggested or completed entry as the user types.</td>
* </tr>
+ * <tr>
+ * <td>autoCompleteList</td>
+ * <td>String</td>
+ * <td>false</td>
+ * <td>Array = true maxlength = 1000 minsize = 0 maxsize = 100</td>
+ * <td>Allows an app to prepopulate the text field with a list of suggested or completed entry as the user types. Set to 0 to remove the auto-complete list from the screen</td>
+ * </tr>
* </table>
*
* @since SmartDeviceLink 3.0
@@ -104,6 +111,7 @@ public class KeyboardProperties extends RPCStruct {
public static final String KEY_KEYBOARD_LAYOUT = "keyboardLayout";
public static final String KEY_LIMITED_CHARACTER_LIST = "limitedCharacterList";
public static final String KEY_AUTO_COMPLETE_TEXT = "autoCompleteText";
+ public static final String KEY_AUTO_COMPLETE_LIST = "autoCompleteList";
public static final String KEY_LANGUAGE = "language";
private static final KeypressMode KEYPRESS_MODE_DEFAULT = KeypressMode.RESEND_CURRENT_ENTRY;
@@ -167,4 +175,22 @@ public class KeyboardProperties extends RPCStruct {
public void setAutoCompleteText(String autoCompleteText) {
setValue(KEY_AUTO_COMPLETE_TEXT, autoCompleteText);
}
+
+ /**
+ * Gets the list that allows an app to prepopulate the text field with a list of suggested or
+ * completed entry as the user types.
+ * @return List<String> representing the suggestions list
+ */
+ public List<String> getAutoCompleteList() {
+ return (List<String>) getObject(String.class, KEY_AUTO_COMPLETE_LIST);
+ }
+
+ /**
+ * Sets the lists that allows an app to prepopulate the text field with a list of suggested or
+ * completed entry as the user types. Set to 0 to remove the auto-complete list from the screen
+ * @param autoCompleteList List<String> representing the suggestions list
+ */
+ public void setAutoCompleteList(List<String> autoCompleteList) {
+ setValue(KEY_AUTO_COMPLETE_LIST, autoCompleteList);
+ }
}