Fix view identity key QR code action.

This commit is contained in:
Moxie Marlinspike 2012-07-23 13:50:12 -07:00
parent 78998d0c93
commit a1b077c349
2 changed files with 16 additions and 17 deletions

View File

@ -32,7 +32,7 @@
android:padding="5dip" android:padding="5dip"
android:layout_width="100dip" android:layout_width="100dip"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Compare" /> android:text="QR Code" />
<Button android:id="@+id/ok_button" <Button android:id="@+id/ok_button"
android:layout_margin="10dip" android:layout_margin="10dip"

View File

@ -16,13 +16,13 @@
*/ */
package org.thoughtcrime.securesms; package org.thoughtcrime.securesms;
import org.thoughtcrime.securesms.crypto.IdentityKey;
import android.os.Bundle; import android.os.Bundle;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
import android.widget.TextView; import android.widget.TextView;
import org.thoughtcrime.securesms.crypto.IdentityKey;
/** /**
* Activity for displaying an identity key. * Activity for displaying an identity key.
* *
@ -61,14 +61,13 @@ public class ViewIdentityActivity extends KeyScanningActivity {
private void initializeResources() { private void initializeResources() {
this.identityKey = (IdentityKey)getIntent().getParcelableExtra("identity_key"); this.identityKey = (IdentityKey)getIntent().getParcelableExtra("identity_key");
this.identityFingerprint = (TextView)findViewById(R.id.identity_fingerprint); this.identityFingerprint = (TextView)findViewById(R.id.identity_fingerprint);
this.okButton = (Button)findViewById(R.id.ok_button); this.okButton = (Button)findViewById(R.id.ok_button);
this.compareButton = (Button)findViewById(R.id.compare_button); this.compareButton = (Button)findViewById(R.id.compare_button);
} }
private class CompareListener implements View.OnClickListener { private class CompareListener implements View.OnClickListener {
public void onClick(View v) { public void onClick(View v) {
registerForContextMenu(compareButton); initiateDisplay();
compareButton.showContextMenu();
} }
} }