Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
入力ボックスに複数のフィルターを設定する方法を教えてください。
これは私がしようとしているものです:
input.setFilters( new InputFilter[] {new InputFilter.LengthFilter(20)}); input.setFilters( new InputFilter[] {new InputFilter.AllCaps()});
しかし、最後のフィルターのみが適用されます... Googleで何も見つかりません。
以下を試してください: -
input.setFilters( new InputFilter[] {new InputFilter.LengthFilter(20), new InputFilter.AllCaps()});
また
InputFilter[] filters = {new InputFilter.LengthFilter(20), new InputFilter.AllCaps()}; input.setFilters(filters);