Added buttons to the home screen, committed resources to git.
1
briar-android/.gitignore
vendored
@@ -1,4 +1,3 @@
|
||||
bin
|
||||
gen
|
||||
res
|
||||
local.properties
|
||||
|
||||
BIN
briar-android/res/drawable-hdpi/content_email.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
briar-android/res/drawable-hdpi/device_access_accounts.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
briar-android/res/drawable-hdpi/green_bulb.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
briar-android/res/drawable-hdpi/grey_bulb.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
briar-android/res/drawable-hdpi/navigation_cancel.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
briar-android/res/drawable-hdpi/navigation_refresh.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
briar-android/res/drawable-hdpi/notification_icon.png
Normal file
|
After Width: | Height: | Size: 181 B |
BIN
briar-android/res/drawable-hdpi/social_chat.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
briar-android/res/drawable-hdpi/social_person.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
briar-android/res/drawable-hdpi/social_share.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
briar-android/res/drawable-mdpi/content_email.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
briar-android/res/drawable-mdpi/device_access_accounts.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
briar-android/res/drawable-mdpi/green_bulb.png
Normal file
|
After Width: | Height: | Size: 689 B |
BIN
briar-android/res/drawable-mdpi/grey_bulb.png
Normal file
|
After Width: | Height: | Size: 605 B |
BIN
briar-android/res/drawable-mdpi/navigation_cancel.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
briar-android/res/drawable-mdpi/navigation_refresh.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
briar-android/res/drawable-mdpi/social_chat.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
briar-android/res/drawable-mdpi/social_person.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
briar-android/res/drawable-mdpi/social_share.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
briar-android/res/drawable-xhdpi/content_email.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
briar-android/res/drawable-xhdpi/device_access_accounts.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
briar-android/res/drawable-xhdpi/green_bulb.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
briar-android/res/drawable-xhdpi/grey_bulb.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
briar-android/res/drawable-xhdpi/navigation_cancel.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
briar-android/res/drawable-xhdpi/navigation_refresh.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
briar-android/res/drawable-xhdpi/social_chat.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
briar-android/res/drawable-xhdpi/social_person.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
briar-android/res/drawable-xhdpi/social_share.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
@@ -5,7 +5,9 @@
|
||||
<string name="notification_text">Touch to quit.</string>
|
||||
<string name="contact_list_button">Contacts</string>
|
||||
<string name="messages_button">Messages</string>
|
||||
<string name="settings_button">Settings</string>
|
||||
<string name="boards_button">Boards</string>
|
||||
<string name="blogs_button">Blogs</string>
|
||||
<string name="synchronize_button">Synchronize</string>
|
||||
<string name="quit_button">Quit</string>
|
||||
<string name="contact_list_title">Contacts</string>
|
||||
<string name="contact_connected">Connected</string>
|
||||
|
||||
@@ -58,18 +58,18 @@ public class HomeScreenActivity extends BriarActivity {
|
||||
ListView.LayoutParams matchParent = new ListView.LayoutParams(
|
||||
MATCH_PARENT, MATCH_PARENT);
|
||||
|
||||
Button contactListButton = new Button(this);
|
||||
contactListButton.setLayoutParams(matchParent);
|
||||
contactListButton.setCompoundDrawablesWithIntrinsicBounds(0,
|
||||
Button contactsButton = new Button(this);
|
||||
contactsButton.setLayoutParams(matchParent);
|
||||
contactsButton.setCompoundDrawablesWithIntrinsicBounds(0,
|
||||
R.drawable.social_person, 0, 0);
|
||||
contactListButton.setText(R.string.contact_list_button);
|
||||
contactListButton.setOnClickListener(new OnClickListener() {
|
||||
contactsButton.setText(R.string.contact_list_button);
|
||||
contactsButton.setOnClickListener(new OnClickListener() {
|
||||
public void onClick(View view) {
|
||||
startActivity(new Intent(HomeScreenActivity.this,
|
||||
ContactListActivity.class));
|
||||
}
|
||||
});
|
||||
buttons.add(contactListButton);
|
||||
buttons.add(contactsButton);
|
||||
|
||||
Button messagesButton = new Button(this);
|
||||
messagesButton.setLayoutParams(matchParent);
|
||||
@@ -83,22 +83,46 @@ public class HomeScreenActivity extends BriarActivity {
|
||||
});
|
||||
buttons.add(messagesButton);
|
||||
|
||||
Button settingsButton = new Button(this);
|
||||
settingsButton.setLayoutParams(matchParent);
|
||||
settingsButton.setCompoundDrawablesWithIntrinsicBounds(0,
|
||||
R.drawable.action_settings, 0, 0);
|
||||
settingsButton.setText(R.string.settings_button);
|
||||
settingsButton.setOnClickListener(new OnClickListener() {
|
||||
Button boardsButton = new Button(this);
|
||||
boardsButton.setLayoutParams(matchParent);
|
||||
boardsButton.setCompoundDrawablesWithIntrinsicBounds(0,
|
||||
R.drawable.social_chat, 0, 0);
|
||||
boardsButton.setText(R.string.boards_button);
|
||||
boardsButton.setOnClickListener(new OnClickListener() {
|
||||
public void onClick(View view) {
|
||||
// FIXME: Hook this button up to an activity
|
||||
}
|
||||
});
|
||||
buttons.add(settingsButton);
|
||||
buttons.add(boardsButton);
|
||||
|
||||
Button blogsButton = new Button(this);
|
||||
blogsButton.setLayoutParams(matchParent);
|
||||
blogsButton.setCompoundDrawablesWithIntrinsicBounds(0,
|
||||
R.drawable.social_share, 0, 0);
|
||||
blogsButton.setText(R.string.blogs_button);
|
||||
blogsButton.setOnClickListener(new OnClickListener() {
|
||||
public void onClick(View view) {
|
||||
// FIXME: Hook this button up to an activity
|
||||
}
|
||||
});
|
||||
buttons.add(blogsButton);
|
||||
|
||||
Button syncButton = new Button(this);
|
||||
syncButton.setLayoutParams(matchParent);
|
||||
syncButton.setCompoundDrawablesWithIntrinsicBounds(0,
|
||||
R.drawable.navigation_refresh, 0, 0);
|
||||
syncButton.setText(R.string.synchronize_button);
|
||||
syncButton.setOnClickListener(new OnClickListener() {
|
||||
public void onClick(View view) {
|
||||
// FIXME: Hook this button up to an activity
|
||||
}
|
||||
});
|
||||
buttons.add(syncButton);
|
||||
|
||||
Button quitButton = new Button(this);
|
||||
quitButton.setLayoutParams(matchParent);
|
||||
quitButton.setCompoundDrawablesWithIntrinsicBounds(0,
|
||||
R.drawable.navigation_cancel, 0, 0);
|
||||
R.drawable.device_access_accounts, 0, 0);
|
||||
quitButton.setText(R.string.quit_button);
|
||||
quitButton.setOnClickListener(new OnClickListener() {
|
||||
public void onClick(View view) {
|
||||
|
||||