Skip to content

Commit

Permalink
Changing language will now happen without needing to restart
Browse files Browse the repository at this point in the history
  • Loading branch information
markwinter committed Sep 23, 2014
1 parent 797b467 commit 8acee73
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

<activity
android:name=".activities.MainActivity"
android:configChanges="locale|orientation|screenSize"
android:configChanges="orientation|screenSize"
android:windowSoftInputMode="stateAlwaysHidden" >
</activity>
<activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3)

@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
if(charSequence != null)
if(leftPaneAdapter != null)
leftPaneAdapter.getFilter().filter(charSequence);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,5 +278,11 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, Strin

}
}

if(key.equals("language")) {
Intent intent = getActivity().getIntent();
getActivity().finish();
startActivity(intent);
}
}
}

0 comments on commit 8acee73

Please sign in to comment.