fix MessageDetailsActivity home button

// FREEBIE
This commit is contained in:
Jake McGinty 2015-03-04 16:37:48 -08:00
parent 301ed0b255
commit d6e0199e05
2 changed files with 14 additions and 4 deletions

View File

@ -125,10 +125,7 @@
android:label="Message Details"
android:windowSoftInputMode="stateUnchanged"
android:launchMode="singleTask"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
android:parentActivityName=".ConversationListActivity">
<meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".ConversationListActivity" />
</activity>
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".GroupCreateActivity"
android:windowSoftInputMode="stateVisible"

View File

@ -25,6 +25,7 @@ import android.support.v4.app.LoaderManager.LoaderCallbacks;
import android.support.v4.content.Loader;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;
@ -80,6 +81,7 @@ public class MessageDetailsActivity extends PassphraseRequiredActionBarActivity
initializeResources();
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportLoaderManager().initLoader(0, null, this);
}
@ -199,6 +201,17 @@ public class MessageDetailsActivity extends PassphraseRequiredActionBarActivity
recipientsList.setAdapter(null);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
super.onOptionsItemSelected(item);
switch (item.getItemId()) {
case android.R.id.home: finish(); return true;
}
return false;
}
private class MessageRecipientAsyncTask extends AsyncTask<Void,Void,Recipients> {
private WeakReference<Context> weakContext;
private MessageRecord messageRecord;