Remove non-themed theme madness.
This commit is contained in:
parent
647c41bf66
commit
44c221c9f1
4 changed files with 270 additions and 360 deletions
BIN
libs/android-support-v4.jar
Normal file
BIN
libs/android-support-v4.jar
Normal file
Binary file not shown.
|
@ -1,102 +1,51 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout android:id="@+id/title_bar_container"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="43dip"
|
||||
android:background="@drawable/iphone_bar_top"
|
||||
android:layout_alignParentTop="true">
|
||||
<TextView
|
||||
android:textSize="18.0dip"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#ffffffff"
|
||||
android:singleLine="true"
|
||||
style="?android:windowTitleStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TextSecure"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center" />
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/settings_button"-->
|
||||
<!-- android:paddingLeft="2.0dip" -->
|
||||
<!-- android:paddingRight="5.0dip" -->
|
||||
<!-- android:layout_width="wrap_content" -->
|
||||
<!-- android:layout_height="wrap_content" -->
|
||||
<!-- android:src="@drawable/ic_settings_iphone" -->
|
||||
<!-- android:adjustViewBounds="false" -->
|
||||
<!-- android:layout_alignParentRight="true" -->
|
||||
<!-- android:layout_centerVertical="true" />-->
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<EditText android:id="@+id/search_text"
|
||||
android:layout_height="wrap_content"
|
||||
android:capitalize="sentences"
|
||||
android:autoText="true"
|
||||
android:singleLine="true"
|
||||
android:hint="Search"
|
||||
android:paddingRight="50dip"
|
||||
android:layout_margin="10dip"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="gone"/>
|
||||
<EditText android:id="@+id/search_text"
|
||||
android:layout_height="wrap_content"
|
||||
android:capitalize="sentences"
|
||||
android:autoText="true"
|
||||
android:singleLine="true"
|
||||
android:hint="Search"
|
||||
android:paddingRight="50dip"
|
||||
android:layout_margin="10dip"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ImageView android:id="@+id/search_close"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="16dip"
|
||||
android:layout_marginBottom="20dip"
|
||||
android:src="@android:drawable/btn_dialog"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="16dip"
|
||||
android:layout_marginBottom="20dip"
|
||||
android:src="@android:drawable/btn_dialog"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<ListView android:id="@android:id/list"
|
||||
style="?android:attr/listViewWhiteStyle"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:drawSelectorOnTop="false"
|
||||
android:scrollbarStyle="insideOverlay"
|
||||
android:fadingEdgeLength="16dip"
|
||||
android:background="@android:color/white"
|
||||
android:cacheColorHint="@android:color/white"
|
||||
android:layout_below="@id/title_bar_container"
|
||||
android:layout_above="@id/search_text" />
|
||||
<ListView android:id="@android:id/list"
|
||||
style="?android:attr/listViewWhiteStyle"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:drawSelectorOnTop="false"
|
||||
android:scrollbarStyle="insideOverlay"
|
||||
android:fadingEdgeLength="16dip"
|
||||
android:background="@android:color/white"
|
||||
android:cacheColorHint="@android:color/white"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_above="@id/search_text" />
|
||||
|
||||
<ProgressBar android:id="@+id/search_progress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- <LinearLayout android:orientation="horizontal"-->
|
||||
<!-- android:layout_width="fill_parent"-->
|
||||
<!-- android:layout_height="wrap_content">-->
|
||||
|
||||
<!-- <TextView android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_margin="10dip"-->
|
||||
<!-- android:textAppearance="?android:attr/textAppearanceMedium"-->
|
||||
<!-- android:singleLine="true" -->
|
||||
<!-- android:text="Search:" />-->
|
||||
|
||||
|
||||
<!-- -->
|
||||
<!-- <EditText android:layout_width="fill_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_margin="10dip"-->
|
||||
<!-- android:id="@+id/search_text" />-->
|
||||
|
||||
<!-- </LinearLayout>-->
|
||||
<ProgressBar android:id="@+id/search_progress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
|
@ -16,11 +16,6 @@
|
|||
*/
|
||||
package org.thoughtcrime.securesms;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.thoughtcrime.securesms.database.MessageRecord;
|
||||
import org.thoughtcrime.securesms.recipients.Recipients;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.preference.PreferenceManager;
|
||||
|
@ -36,6 +31,11 @@ import android.widget.ImageView;
|
|||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.thoughtcrime.securesms.database.MessageRecord;
|
||||
import org.thoughtcrime.securesms.recipients.Recipients;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* A view that displays the element in a list of multiple conversation threads.
|
||||
* Used by SecureSMS's ListActivity via a ConversationListAdapter.
|
||||
|
@ -84,7 +84,6 @@ public class ConversationHeaderView extends RelativeLayout {
|
|||
this.checkbox = (CheckBox)findViewById(R.id.checkbox);
|
||||
|
||||
intializeListeners();
|
||||
initializeColors();
|
||||
}
|
||||
|
||||
public ConversationHeaderView(Context context, AttributeSet attrs) {
|
||||
|
@ -128,20 +127,6 @@ public class ConversationHeaderView extends RelativeLayout {
|
|||
}
|
||||
}
|
||||
|
||||
public void initializeColors() {
|
||||
if (!PreferenceManager.getDefaultSharedPreferences(getContext()).getBoolean(ApplicationPreferencesActivity.DARK_THREADS_PREF, true)) {
|
||||
this.setBackgroundDrawable(getResources().getDrawable(R.drawable.conversation_header_background_light));
|
||||
this.subjectView.setTextColor(Color.BLACK);
|
||||
this.fromView.setTextColor(Color.BLACK);
|
||||
this.dateView.setTextColor(Color.LTGRAY);
|
||||
} else {
|
||||
this.setBackgroundColor(Color.TRANSPARENT);
|
||||
this.subjectView.setTextColor(Color.LTGRAY);
|
||||
this.fromView.setTextColor(Color.WHITE);
|
||||
this.dateView.setTextColor(Color.LTGRAY);
|
||||
}
|
||||
}
|
||||
|
||||
private void intializeListeners() {
|
||||
checkbox.setOnCheckedChangeListener(new CheckedChangedListener());
|
||||
}
|
||||
|
|
|
@ -16,10 +16,43 @@
|
|||
*/
|
||||
package org.thoughtcrime.securesms;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.ServiceConnection;
|
||||
import android.content.SharedPreferences;
|
||||
import android.database.ContentObserver;
|
||||
import android.database.Cursor;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.os.Message;
|
||||
import android.os.Parcelable;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.KeyCharacterMap;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.CursorAdapter;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockListActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
import com.actionbarsherlock.view.SubMenu;
|
||||
|
||||
import org.thoughtcrime.securesms.contacts.ContactAccessor;
|
||||
import org.thoughtcrime.securesms.crypto.DecryptingQueue;
|
||||
|
@ -41,46 +74,10 @@ import org.thoughtcrime.securesms.service.SendReceiveService;
|
|||
import org.thoughtcrime.securesms.util.Eula;
|
||||
import org.thoughtcrime.securesms.util.MemoryCleaner;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ListActivity;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.ServiceConnection;
|
||||
import android.content.SharedPreferences;
|
||||
import android.database.ContentObserver;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.os.Message;
|
||||
import android.os.Parcelable;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.KeyCharacterMap;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.SubMenu;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.CursorAdapter;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.Toast;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -90,7 +87,7 @@ import android.widget.Toast;
|
|||
* @author Moxie Marlinspike
|
||||
*/
|
||||
|
||||
public class SecureSMS extends ListActivity {
|
||||
public class SecureSMS extends SherlockListActivity {
|
||||
|
||||
private static final int MENU_SEND_KEY = 1;
|
||||
private static final int MENU_PASSPHRASE_KEY = 2;
|
||||
|
@ -123,12 +120,16 @@ public class SecureSMS extends ListActivity {
|
|||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
getWindow().requestFeature(Window.FEATURE_NO_TITLE);
|
||||
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setTitle("TextSecure");
|
||||
|
||||
setContentView(R.layout.main);
|
||||
|
||||
initializeKillReceiver();
|
||||
initializeSenderReceiverService();
|
||||
initializeResources();
|
||||
initializeSearchListener();
|
||||
|
||||
registerForContextMenu(getListView());
|
||||
registerForContactsUpdates();
|
||||
}
|
||||
|
@ -149,8 +150,7 @@ public class SecureSMS extends ListActivity {
|
|||
super.onResume();
|
||||
|
||||
Log.w("securesms", "restart called...");
|
||||
initializeColors();
|
||||
Eula.showEula(this);
|
||||
Eula.showDisclaimer(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -301,7 +301,7 @@ public class SecureSMS extends ListActivity {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onContextItemSelected(MenuItem item) {
|
||||
public boolean onContextItemSelected(android.view.MenuItem item) {
|
||||
Cursor cursor = ((CursorAdapter)this.getListAdapter()).getCursor();
|
||||
long threadId = cursor.getLong(cursor.getColumnIndexOrThrow(ThreadDatabase.ID));
|
||||
String recipientId = cursor.getString(cursor.getColumnIndexOrThrow(ThreadDatabase.RECIPIENT_IDS));
|
||||
|
@ -392,11 +392,6 @@ public class SecureSMS extends ListActivity {
|
|||
manager.cancel(KeyCachingService.NOTIFICATION_ID);
|
||||
}
|
||||
|
||||
private void initializeResources() {
|
||||
// ImageView settingsImage = (ImageView)findViewById(R.id.settings_button);
|
||||
// settingsImage.setOnClickListener(new SettingsClickListener());
|
||||
}
|
||||
|
||||
private void initializeKillReceiver() {
|
||||
killActivityReceiver = new KillActivityReceiver();
|
||||
registerReceiver(killActivityReceiver, new IntentFilter(KeyCachingService.PASSPHRASE_EXPIRED_EVENT),
|
||||
|
@ -468,25 +463,6 @@ public class SecureSMS extends ListActivity {
|
|||
registerReceiver(receiver, filter, KeyCachingService.KEY_PERMISSION, null);
|
||||
}
|
||||
|
||||
private void initializeColors() {
|
||||
if (!PreferenceManager.getDefaultSharedPreferences(this).getBoolean(ApplicationPreferencesActivity.DARK_THREADS_PREF, true)) {
|
||||
this.getListView().setBackgroundColor(Color.WHITE);
|
||||
this.getListView().setCacheColorHint(Color.WHITE);
|
||||
this.getListView().setDivider(new ColorDrawable(Color.parseColor("#cccccc")));
|
||||
this.getListView().setDividerHeight(1);
|
||||
} else {
|
||||
this.getListView().setBackgroundColor(Color.BLACK);
|
||||
this.getListView().setCacheColorHint(Color.BLACK);
|
||||
this.getListView().setDivider(this.getResources().getDrawable(R.drawable.dark_divider));
|
||||
this.getListView().setDividerHeight(1);
|
||||
}
|
||||
|
||||
if (headerView != null) {
|
||||
headerView.initializeColors();
|
||||
headerView.setBackgroundColor(Color.TRANSPARENT);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onListItemClick(ListView l, View v, int position, long id) {
|
||||
if (position == 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue