- Implemented dynamic context menu on attendees list

- bug fix with number of likes

TODO:
update likes on perticipents activity after liking an attendee
master
spike 13 years ago
parent 2b4e4d58a9
commit be4b18a000

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- When selected, use grey -->
<item android:drawable="@drawable/ic_tab_search_dark"
android:state_selected="true" />
<!-- When not selected, use white-->
<item android:drawable="@drawable/ic_tab_search_light" />
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

@ -66,10 +66,9 @@
<TextView
android:id="@+id/likes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_height="match_parent"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceSmall" android:layout_marginTop="10px" android:layout_marginRight="20px" android:drawableBottom="@drawable/ic_favorites_tiny"/>
android:textAppearance="?android:attr/textAppearanceSmall" android:drawableRight="@drawable/ic_favorites_tiny" android:gravity="center" android:layout_marginRight="10px"/>
</LinearLayout>

@ -3,13 +3,20 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ffffff"
android:orientation="vertical" android:layout_gravity="center">
android:orientation="vertical" android:layout_gravity="center">
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Developed by:"
android:textAppearance="?android:attr/textAppearanceLarge" android:layout_gravity="center" android:layout_marginTop="160px" android:textColor="#000000"/>
<ImageButton
android:id="@+id/thinkit_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/logo_thinkit" android:layout_gravity="center_vertical|center_horizontal" android:layout_marginTop="200px" android:paddingBottom="0px" android:paddingLeft="0px" android:paddingRight="0px" android:paddingTop="0px"/>
android:src="@drawable/logo_thinkit" android:layout_gravity="center_vertical|center_horizontal" android:layout_marginTop="30px" android:paddingBottom="0px" android:paddingLeft="0px" android:paddingRight="0px" android:paddingTop="0px"/>
<TextView
android:id="@+id/email"

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World, LeWebConnectActivity!</string>
<string name="app_name">LeWebConnect</string>
<string name="app_name">LeWeb Connect</string>
<string name="search_hint">type to filter or use menu</string>
<string name="filter_name">By Name</string>
<string name="filter_company">By Company</string>

@ -29,6 +29,7 @@ import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.Adapter;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
@ -235,10 +236,18 @@ public class Perticipents extends ListActivity {
public void onCreateContextMenu(ContextMenu menu, View v,
ContextMenu.ContextMenuInfo menuInfo) {
super.onCreateContextMenu((ContextMenu) menu, v, menuInfo);
menu.add(0, FACEBOOK, 0, R.string.facebook_menu);
super.onCreateContextMenu((ContextMenu) menu, v, menuInfo);
AdapterView.AdapterContextMenuInfo info =
(AdapterView.AdapterContextMenuInfo) menuInfo;
LeWebAdapter adapter = (LeWebAdapter) getListAdapter();
Attendee user = (Attendee) adapter.users.get(info.position);
if (user.isHas_facebook())
menu.add(0, FACEBOOK, 0, R.string.facebook_menu);
if (user.isHas_twitter())
menu.add(0, TWITTER, 0, R.string.twitter_menu);
menu.add(0, LINKEDIN, 0, R.string.linkedin_menu);
if (user.isHas_linkedin())
menu.add(0, LINKEDIN, 0, R.string.linkedin_menu);
}

Loading…
Cancel
Save