Skip to content

Commit

Permalink
Listview scroll to top
Browse files Browse the repository at this point in the history
  • Loading branch information
tanujnotes committed Dec 24, 2020
1 parent 7208c6a commit a1d42f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/main/java/app/olauncher/light/MainActivity.java
Original file line number Diff line number Diff line change
@@ -46,6 +46,7 @@ public class MainActivity extends Activity implements View.OnClickListener, View
private Prefs prefs;
private View appDrawer;
private EditText search;
private ListView appListView;
private AppAdapter appAdapter;
private LinearLayout homeAppsLayout;
private TextView homeApp1, homeApp2, homeApp3, homeApp4, homeApp5, homeApp6, setDefaultLauncher;
@@ -74,7 +75,7 @@ protected void onCreate(Bundle savedInstanceState) {
appDrawer = findViewById(R.id.app_drawer_layout);

appAdapter = new AppAdapter(this, appList, getAppClickListener());
ListView appListView = findViewById(R.id.app_list_view);
appListView = findViewById(R.id.app_list_view);
appListView.setAdapter(appAdapter);

search.addTextChangedListener(new TextWatcher() {
@@ -174,6 +175,7 @@ private void backToHome() {
appAdapter.setFlag(FLAG_LAUNCH_APP);
hideKeyboard();
checkForDefaultLauncher();
appListView.setSelectionAfterHeaderView();
}

private void refreshAppsList() {

0 comments on commit a1d42f0

Please sign in to comment.