Skip to content

Commit

Permalink
fix(android): Extra left margin (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyii authored and iRoachie committed Oct 20, 2019
1 parent dd6cdc6 commit 28ae409
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion android/src/main/java/org/umhan35/RNSearchBarManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ public void setTextFieldBackgroundColor(SearchView searchView, @Nullable Integer
protected SearchView createViewInstance(@Nonnull ThemedReactContext reactContext) {
SearchView searchView = new SearchView(reactContext);
searchView.setIconifiedByDefault(false);
searchView.setPaddingRelative(0, 5, 10, 5);
int padding_start_in_dp = (int) (-16 * reactContext.getResources().getDisplayMetrics().density);
searchView.setPaddingRelative(padding_start_in_dp, 5, 10, 5);

searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
Expand Down

0 comments on commit 28ae409

Please sign in to comment.