add dynamicTheme and dynamicLanguage to MessageDetailsActivity

Closes #2640

//FREEBIE
This commit is contained in:
agrajaghh 2015-03-10 20:40:55 +01:00 committed by Moxie Marlinspike
parent b998c5f86c
commit b3552ee347

View File

@ -43,6 +43,8 @@ import org.thoughtcrime.securesms.recipients.Recipient;
import org.thoughtcrime.securesms.recipients.Recipients; import org.thoughtcrime.securesms.recipients.Recipients;
import org.thoughtcrime.securesms.util.DateUtils; import org.thoughtcrime.securesms.util.DateUtils;
import org.thoughtcrime.securesms.util.DirectoryHelper; import org.thoughtcrime.securesms.util.DirectoryHelper;
import org.thoughtcrime.securesms.util.DynamicLanguage;
import org.thoughtcrime.securesms.util.DynamicTheme;
import org.thoughtcrime.securesms.util.GroupUtil; import org.thoughtcrime.securesms.util.GroupUtil;
import java.io.IOException; import java.io.IOException;
@ -77,8 +79,13 @@ public class MessageDetailsActivity extends PassphraseRequiredActionBarActivity
private ListView recipientsList; private ListView recipientsList;
private LayoutInflater inflater; private LayoutInflater inflater;
private DynamicTheme dynamicTheme = new DynamicTheme();
private DynamicLanguage dynamicLanguage = new DynamicLanguage();
@Override @Override
public void onCreate(Bundle bundle) { public void onCreate(Bundle bundle) {
dynamicTheme.onCreate(this);
dynamicLanguage.onCreate(this);
super.onCreate(bundle); super.onCreate(bundle);
setContentView(R.layout.message_details_activity); setContentView(R.layout.message_details_activity);
@ -88,6 +95,13 @@ public class MessageDetailsActivity extends PassphraseRequiredActionBarActivity
getSupportLoaderManager().initLoader(0, null, this); getSupportLoaderManager().initLoader(0, null, this);
} }
@Override
protected void onResume() {
super.onResume();
dynamicTheme.onResume(this);
dynamicLanguage.onResume(this);
}
private void initializeResources() { private void initializeResources() {
inflater = LayoutInflater.from(this); inflater = LayoutInflater.from(this);
View header = inflater.inflate(R.layout.message_details_header, recipientsList, false); View header = inflater.inflate(R.layout.message_details_header, recipientsList, false);