Sha256: 6d18931ccb80afb635fd172ceecefd186810ec4b137d2fbad2009bde6b9c9445
Contents?: true
Size: 978 Bytes
Versions: 25
Compression:
Stored size: 978 Bytes
Contents
package sh.calaba.instrumentationbackend.actions.search; import android.annotation.TargetApi; import android.os.Build; import android.widget.SearchView; import sh.calaba.instrumentationbackend.InstrumentationBackend; import sh.calaba.instrumentationbackend.Result; import sh.calaba.instrumentationbackend.actions.Action; @TargetApi(Build.VERSION_CODES.HONEYCOMB) public class EnterQueryByIndex implements Action { @Override public Result execute(String... args) { final String query = args[0]; final SearchView view = (SearchView) InstrumentationBackend.solo.getView(SearchView.class, Integer.parseInt(args[1]) - 1); InstrumentationBackend.solo.getCurrentActivity().runOnUiThread(new Runnable() { public void run() { view.setQuery(query, true); } }); return Result.successResult(); } @Override public String key() { return "enter_query_into_numbered_field"; } }
Version data entries
25 entries across 25 versions & 1 rubygems