Its closer to working
This commit is contained in:
parent
1cdcc8794c
commit
b69015a25a
|
@ -208,6 +208,9 @@ public class HomeFragment extends AppKitFragment implements OnBackPressedListene
|
|||
}
|
||||
getChildFragmentManager().beginTransaction().hide(fragmentForTab(currentTab)).show(newFragment).commit();
|
||||
maybeTriggerLoading(newFragment);
|
||||
// if(tab == currentTab && tab == R.id.tab_search){
|
||||
// searchFragment.selectSearch();
|
||||
// }
|
||||
currentTab=tab;
|
||||
((FragmentStackActivity)getActivity()).invalidateSystemBarColors(this);
|
||||
}
|
||||
|
@ -236,8 +239,8 @@ public class HomeFragment extends AppKitFragment implements OnBackPressedListene
|
|||
return true;
|
||||
}
|
||||
if(tab==R.id.tab_search){
|
||||
searchFragment.selectSearch(true);
|
||||
onTabSelected(tab);
|
||||
searchFragment.selectSearch();
|
||||
onTabSelected(R.id.tab_search);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -19,6 +19,7 @@ import android.widget.ImageButton;
|
|||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.joinmastodon.android.BuildConfig;
|
||||
import org.joinmastodon.android.GlobalUserPreferences;
|
||||
|
@ -48,7 +49,6 @@ public class DiscoverFragment extends AppKitFragment implements ScrollableToTop,
|
|||
private TabLayoutMediator tabLayoutMediator;
|
||||
private EditText searchEdit;
|
||||
private boolean searchActive;
|
||||
public boolean wasTriggeredByLongPress = false;
|
||||
private FrameLayout searchView;
|
||||
private ImageButton searchBack, searchClear;
|
||||
private ProgressBar searchProgress;
|
||||
|
@ -362,11 +362,9 @@ public class DiscoverFragment extends AppKitFragment implements ScrollableToTop,
|
|||
}
|
||||
}
|
||||
|
||||
public void selectSearch(boolean selectSearch){
|
||||
wasTriggeredByLongPress=selectSearch;
|
||||
public void selectSearch(){
|
||||
searchEdit.requestFocus();
|
||||
onSearchEditFocusChanged(searchEdit, selectSearch);
|
||||
onSearchEditFocusChanged(searchEdit, true);
|
||||
getActivity().getSystemService(InputMethodManager.class).showSoftInput(searchEdit, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue