Messaging;
This commit is contained in:
@@ -50,6 +50,16 @@
|
||||
android:label="Menu"
|
||||
android:screenOrientation="portrait">
|
||||
</activity>
|
||||
<activity android:name=".Messages"
|
||||
android:configChanges="keyboardHidden|orientation"
|
||||
android:label="Messages"
|
||||
android:screenOrientation="portrait">
|
||||
</activity>
|
||||
<activity android:name=".Conversation"
|
||||
android:configChanges="keyboardHidden|orientation"
|
||||
android:label="Conversation"
|
||||
android:screenOrientation="portrait">
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -15,6 +15,7 @@ public final class R {
|
||||
}
|
||||
public static final class color {
|
||||
public static final int contentdark=0x7f050004;
|
||||
public static final int contentmiddle=0x7f050005;
|
||||
public static final int light=0x7f050002;
|
||||
public static final int lightdiv=0x7f050003;
|
||||
public static final int transparent=0x7f050000;
|
||||
@@ -22,80 +23,106 @@ public final class R {
|
||||
}
|
||||
public static final class drawable {
|
||||
public static final int background=0x7f020000;
|
||||
public static final int background_dark=0x7f020001;
|
||||
public static final int background_row=0x7f020002;
|
||||
public static final int background_row_dark=0x7f020003;
|
||||
public static final int bg_top=0x7f020004;
|
||||
public static final int findme_light=0x7f020005;
|
||||
public static final int friends=0x7f020006;
|
||||
public static final int home_button=0x7f020007;
|
||||
public static final int ic_tab_artists_grey=0x7f020008;
|
||||
public static final int ic_tab_artists_white=0x7f020009;
|
||||
public static final int ic_tab_friends=0x7f02000a;
|
||||
public static final int icon=0x7f02000b;
|
||||
public static final int logo=0x7f02000c;
|
||||
public static final int logout=0x7f02000d;
|
||||
public static final int me=0x7f02000e;
|
||||
public static final int messages=0x7f02000f;
|
||||
public static final int nearby=0x7f020010;
|
||||
public static final int search=0x7f020011;
|
||||
public static final int tab_bg_selected=0x7f020012;
|
||||
public static final int tab_bg_selector=0x7f020013;
|
||||
public static final int tab_bg_unselected=0x7f020014;
|
||||
public static final int tab_divider=0x7f020015;
|
||||
public static final int tab_text_selector=0x7f020016;
|
||||
public static final int top_bg=0x7f020017;
|
||||
public static final int user=0x7f020018;
|
||||
public static final int background_row=0x7f020001;
|
||||
public static final int background_row_dark=0x7f020002;
|
||||
public static final int bg_top=0x7f020003;
|
||||
public static final int circle=0x7f020004;
|
||||
public static final int dark=0x7f020005;
|
||||
public static final int findme_light=0x7f020006;
|
||||
public static final int friends=0x7f020007;
|
||||
public static final int home_button=0x7f020008;
|
||||
public static final int ic_tab_artists_grey=0x7f020009;
|
||||
public static final int ic_tab_artists_white=0x7f02000a;
|
||||
public static final int ic_tab_friends=0x7f02000b;
|
||||
public static final int icon=0x7f02000c;
|
||||
public static final int logo=0x7f02000d;
|
||||
public static final int logout=0x7f02000e;
|
||||
public static final int me=0x7f02000f;
|
||||
public static final int messages=0x7f020010;
|
||||
public static final int nearby=0x7f020011;
|
||||
public static final int search=0x7f020012;
|
||||
public static final int tab_bg_selected=0x7f020013;
|
||||
public static final int tab_bg_selector=0x7f020014;
|
||||
public static final int tab_bg_unselected=0x7f020015;
|
||||
public static final int tab_divider=0x7f020016;
|
||||
public static final int tab_text_selector=0x7f020017;
|
||||
public static final int top_bg=0x7f020018;
|
||||
public static final int user=0x7f020019;
|
||||
}
|
||||
public static final class id {
|
||||
public static final int ButtonLoginUser=0x7f08000e;
|
||||
public static final int ButtonRegisterUser=0x7f080018;
|
||||
public static final int ButtonUserRegistration=0x7f080010;
|
||||
public static final int EditTextLoginMail=0x7f08000a;
|
||||
public static final int EditTextLoginPassword=0x7f08000b;
|
||||
public static final int EditTextRegistrationMail=0x7f080016;
|
||||
public static final int EditTextRegistrationName=0x7f080015;
|
||||
public static final int EditTextRegistrationPassword=0x7f080017;
|
||||
public static final int SearchInput=0x7f08001c;
|
||||
public static final int SpinnerLoginUserStatus=0x7f08000d;
|
||||
public static final int TextViewTitle=0x7f08000c;
|
||||
public static final int friends=0x7f080001;
|
||||
public static final int friendslist=0x7f080008;
|
||||
public static final int homebutton=0x7f08001f;
|
||||
public static final int icon=0x7f080020;
|
||||
public static final int icontext=0x7f080022;
|
||||
public static final int logout=0x7f080005;
|
||||
public static final int me=0x7f080004;
|
||||
public static final int messages=0x7f080002;
|
||||
public static final int nearby=0x7f080000;
|
||||
public static final int nearby_list_text=0x7f080014;
|
||||
public static final int nearbylist=0x7f080012;
|
||||
public static final int requests=0x7f080009;
|
||||
public static final int search=0x7f080003;
|
||||
public static final int searchList=0x7f08001a;
|
||||
public static final int search_dialog=0x7f08001b;
|
||||
public static final int tabhost=0x7f080007;
|
||||
public static final int tabsLayout=0x7f08001d;
|
||||
public static final int tabsText=0x7f08001e;
|
||||
public static final int test_image=0x7f08000f;
|
||||
public static final int text=0x7f080021;
|
||||
public static final int topbb=0x7f080011;
|
||||
public static final int topbb2=0x7f080006;
|
||||
public static final int topbb2412=0x7f080019;
|
||||
public static final int user_image=0x7f080013;
|
||||
public static final int ButtonLoginUser=0x7f080015;
|
||||
public static final int ButtonRegisterUser=0x7f080028;
|
||||
public static final int ButtonUserRegistration=0x7f080017;
|
||||
public static final int EditTextLoginMail=0x7f080011;
|
||||
public static final int EditTextLoginPassword=0x7f080012;
|
||||
public static final int EditTextRegistrationMail=0x7f080026;
|
||||
public static final int EditTextRegistrationName=0x7f080025;
|
||||
public static final int EditTextRegistrationPassword=0x7f080027;
|
||||
public static final int SearchInput=0x7f08002b;
|
||||
public static final int SpinnerLoginUserStatus=0x7f080014;
|
||||
public static final int TextViewTitle=0x7f080013;
|
||||
public static final int circlecc=0x7f080000;
|
||||
public static final int circlecc_image=0x7f080001;
|
||||
public static final int conversation=0x7f080002;
|
||||
public static final int findmemenu=0x7f080005;
|
||||
public static final int findmemenuItems=0x7f080006;
|
||||
public static final int friends=0x7f080008;
|
||||
public static final int friendslist=0x7f08000f;
|
||||
public static final int homebutton=0x7f080030;
|
||||
public static final int icon=0x7f080031;
|
||||
public static final int icontext=0x7f080033;
|
||||
public static final int logout=0x7f08000c;
|
||||
public static final int me=0x7f08000b;
|
||||
public static final int messageOverview=0x7f08001a;
|
||||
public static final int messageOverviewList=0x7f080003;
|
||||
public static final int message_item=0x7f080020;
|
||||
public static final int message_overview_item=0x7f08001d;
|
||||
public static final int message_overview_text=0x7f08001f;
|
||||
public static final int message_text=0x7f080021;
|
||||
public static final int messageinput=0x7f080018;
|
||||
public static final int messageinputview=0x7f080004;
|
||||
public static final int messages=0x7f080009;
|
||||
public static final int messagesubmit=0x7f080019;
|
||||
public static final int nearby=0x7f080007;
|
||||
public static final int nearby_list_text=0x7f080024;
|
||||
public static final int nearbylist=0x7f080023;
|
||||
public static final int requests=0x7f080010;
|
||||
public static final int search=0x7f08000a;
|
||||
public static final int searchList=0x7f080029;
|
||||
public static final int search_dialog=0x7f08002a;
|
||||
public static final int tabhost=0x7f08000e;
|
||||
public static final int tabsLayout=0x7f08002c;
|
||||
public static final int tabsText=0x7f08002d;
|
||||
public static final int test_image=0x7f080016;
|
||||
public static final int text=0x7f080032;
|
||||
public static final int title=0x7f08002e;
|
||||
public static final int title2138=0x7f08001c;
|
||||
public static final int titleText=0x7f08002f;
|
||||
public static final int topbb=0x7f080022;
|
||||
public static final int topbb2=0x7f08000d;
|
||||
public static final int topbb9864=0x7f08001b;
|
||||
public static final int user_image=0x7f08001e;
|
||||
}
|
||||
public static final class layout {
|
||||
public static final int findmemenu=0x7f030000;
|
||||
public static final int friends=0x7f030001;
|
||||
public static final int login=0x7f030002;
|
||||
public static final int main=0x7f030003;
|
||||
public static final int nearby=0x7f030004;
|
||||
public static final int nearby_list_item=0x7f030005;
|
||||
public static final int registration=0x7f030006;
|
||||
public static final int search=0x7f030007;
|
||||
public static final int search_dialog=0x7f030008;
|
||||
public static final int tabs_bg=0x7f030009;
|
||||
public static final int topbar=0x7f03000a;
|
||||
public static final int circle_counter=0x7f030000;
|
||||
public static final int conversation=0x7f030001;
|
||||
public static final int findmemenu=0x7f030002;
|
||||
public static final int friends=0x7f030003;
|
||||
public static final int login=0x7f030004;
|
||||
public static final int logo=0x7f030005;
|
||||
public static final int main=0x7f030006;
|
||||
public static final int message_input=0x7f030007;
|
||||
public static final int message_overview=0x7f030008;
|
||||
public static final int message_overview_item=0x7f030009;
|
||||
public static final int messsage_item=0x7f03000a;
|
||||
public static final int nearby=0x7f03000b;
|
||||
public static final int nearby_list_item=0x7f03000c;
|
||||
public static final int registration=0x7f03000d;
|
||||
public static final int search=0x7f03000e;
|
||||
public static final int search_dialog=0x7f03000f;
|
||||
public static final int tabs_bg=0x7f030010;
|
||||
public static final int title=0x7f030011;
|
||||
public static final int topbar=0x7f030012;
|
||||
}
|
||||
public static final class menu {
|
||||
public static final int menu=0x7f070000;
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 224 KiB |
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/circlecc"
|
||||
android:background="@drawable/top_bg"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageView
|
||||
android:src="@drawable/circle"
|
||||
android:id="@+id/circlecc_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
</FrameLayout>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@color/white"
|
||||
android:id="@+id/conversation">
|
||||
|
||||
<include layout="@layout/topbar" />
|
||||
<include layout="@layout/title" />
|
||||
|
||||
<ListView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/messageOverviewList"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" android:layout_weight="1"
|
||||
android:background="@color/white"
|
||||
android:divider="@color/lightdiv"
|
||||
android:dividerHeight="1dip">
|
||||
</ListView>
|
||||
|
||||
<include android:id="@+id/messageinputview" layout="@layout/message_input"
|
||||
android:layout_gravity="bottom" />
|
||||
</LinearLayout>
|
||||
+52
-43
@@ -3,50 +3,59 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/background_dark"
|
||||
android:id="@+id/findmemenu"
|
||||
android:background="@drawable/dark"
|
||||
android:layout_height="fill_parent"
|
||||
android:padding="20dip">
|
||||
|
||||
<ImageButton android:id="@+id/nearby"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="nearbyMenuHandler"
|
||||
android:src="@drawable/nearby"
|
||||
android:paddingTop="80dip"
|
||||
android:paddingBottom="15dip"
|
||||
android:background="@null" />
|
||||
<ImageButton android:id="@+id/friends"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="friendsMenuHandler"
|
||||
android:src="@drawable/friends"
|
||||
android:paddingBottom="15dip"
|
||||
android:background="@null" />
|
||||
<ImageButton android:id="@+id/messages"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="messagesMenuHandler"
|
||||
android:src="@drawable/messages"
|
||||
android:paddingBottom="15dip"
|
||||
android:background="@null" />
|
||||
<ImageButton android:id="@+id/search"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="searchMenuHandler"
|
||||
android:src="@drawable/search"
|
||||
android:paddingBottom="15dip"
|
||||
android:background="@null" />
|
||||
<ImageButton android:id="@+id/me"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="meMenuHandler"
|
||||
android:src="@drawable/me"
|
||||
android:paddingBottom="15dip"
|
||||
android:background="@null" />
|
||||
<ImageButton android:id="@+id/logout"
|
||||
android:onClick="logoutMenuHandler"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/logout"
|
||||
android:background="@null" />
|
||||
<include layout="@layout/logo" />
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="fill_parent"
|
||||
android:id="@+id/findmemenuItems">
|
||||
<ImageButton android:id="@+id/nearby"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="nearbyMenuHandler"
|
||||
android:src="@drawable/nearby"
|
||||
android:paddingBottom="15dip"
|
||||
android:background="@null" />
|
||||
<ImageButton android:id="@+id/friends"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="friendsMenuHandler"
|
||||
android:src="@drawable/friends"
|
||||
android:paddingBottom="15dip"
|
||||
android:background="@null" />
|
||||
<ImageButton android:id="@+id/messages"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="messagesMenuHandler"
|
||||
android:src="@drawable/messages"
|
||||
android:paddingBottom="15dip"
|
||||
android:background="@null" />
|
||||
<ImageButton android:id="@+id/search"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="searchMenuHandler"
|
||||
android:src="@drawable/search"
|
||||
android:paddingBottom="15dip"
|
||||
android:background="@null" />
|
||||
<ImageButton android:id="@+id/me"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="meMenuHandler"
|
||||
android:src="@drawable/me"
|
||||
android:paddingBottom="15dip"
|
||||
android:background="@null" />
|
||||
<ImageButton android:id="@+id/logout"
|
||||
android:onClick="logoutMenuHandler"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/logout"
|
||||
android:background="@null" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -3,17 +3,18 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/background_dark"
|
||||
android:background="@drawable/dark"
|
||||
android:layout_height="fill_parent"
|
||||
android:padding="20dip">
|
||||
|
||||
<include layout="@layout/logo" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/EditTextLoginMail"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="E-Mail"
|
||||
android:inputType="textEmailAddress"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_marginTop="80dip">
|
||||
android:layout_width="fill_parent">
|
||||
</EditText>
|
||||
|
||||
<EditText
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:background="@color/transparent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="20dip"
|
||||
android:paddingBottom="35dip">
|
||||
<ImageView
|
||||
android:src="@drawable/findme_light"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
/>
|
||||
</FrameLayout>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:background="@color/white"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dip"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="10dip"
|
||||
android:paddingLeft="20dip"
|
||||
android:paddingRight="20dip"
|
||||
android:weightSum="1.0">
|
||||
<EditText
|
||||
android:id="@+id/messageinput"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Reply ..."
|
||||
android:layout_width="fill_parent"
|
||||
android:singleLine="false"
|
||||
android:lines="2"
|
||||
android:gravity="top"
|
||||
android:inputType="textMultiLine"
|
||||
android:layout_weight=".25">
|
||||
</EditText>
|
||||
<Button android:id="@+id/messagesubmit"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:onClick="messageSubmitHandler"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:layout_weight=".75"
|
||||
android:text="OK" />
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@color/white"
|
||||
android:id="@+id/messageOverview">
|
||||
|
||||
<include android:id="@+id/topbb9864" layout="@layout/topbar" />
|
||||
<include android:id="@+id/title2138" layout="@layout/title" />
|
||||
|
||||
<ListView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/messageOverviewList"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" android:layout_weight="1"
|
||||
android:background="@color/white"
|
||||
android:fadingEdge="none"
|
||||
android:divider="@color/lightdiv"
|
||||
android:dividerHeight="1dip">
|
||||
</ListView>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:textColor="@color/contentdark"
|
||||
android:id="@+id/message_overview_item">
|
||||
<ImageView
|
||||
android:id="@+id/user_image"
|
||||
android:src="@drawable/user"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginRight="10dip"
|
||||
android:layout_gravity="center_vertical"
|
||||
/>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent">
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Name"
|
||||
android:id="@+id/message_overview_text"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/contentdark"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:textColor="@color/contentdark"
|
||||
android:id="@+id/message_item">
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent">
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Name"
|
||||
android:id="@+id/message_text"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/contentdark"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -3,10 +3,11 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/background_dark"
|
||||
android:layout_height="fill_parent"
|
||||
android:padding="20dip">
|
||||
android:background="@drawable/dark"
|
||||
android:layout_height="fill_parent"
|
||||
android:padding="20dip">
|
||||
|
||||
<include layout="@layout/logo" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TextViewTitle"
|
||||
@@ -15,7 +16,6 @@
|
||||
android:text="Information:"
|
||||
android:textSize="7pt"
|
||||
android:textColor="#39525f"
|
||||
android:layout_marginTop="80dip"
|
||||
android:layout_marginBottom="2dip">
|
||||
</TextView>
|
||||
<EditText
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
android:background="@color/white"
|
||||
android:id="@+id/search">
|
||||
|
||||
<include android:id="@+id/topbb2412" layout="@layout/topbar" />
|
||||
<include layout="@layout/topbar" />
|
||||
<include layout="@layout/title" />
|
||||
|
||||
<ListView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (c) 2010 Josh Clemm
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/tabsLayout" android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" android:background="@drawable/tab_bg_selector"
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/title" android:layout_width="fill_parent"
|
||||
android:layout_height="34dip" android:background="@drawable/tab_bg_selected"
|
||||
android:gravity="top" android:orientation="horizontal">
|
||||
|
||||
<TextView android:id="@+id/titleText" android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" android:text="Title"
|
||||
android:textSize="15dip" android:textColor="@color/white"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="20dip" />
|
||||
</LinearLayout>
|
||||
@@ -5,4 +5,5 @@
|
||||
<color name="light">#f1f3f5ff</color>
|
||||
<color name="lightdiv">#d2d4d5ff</color>
|
||||
<color name="contentdark">#23262c</color>
|
||||
<color name="contentmiddle">#9fa6b3</color>
|
||||
</resources>
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
package com.architects.findme;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import com.architects.helper.*;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.text.Spanned;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.SimpleCursorAdapter;
|
||||
import android.widget.TabHost;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
|
||||
public class Conversation extends Activity {
|
||||
public static final String PREFS_NAME = "LoginCredentials";
|
||||
private static final String TAG = "findme";
|
||||
|
||||
private String sender;
|
||||
private String receiver;
|
||||
|
||||
private ListView messageOverview;
|
||||
|
||||
private ArrayAdapter<Spanned> adapter;
|
||||
ArrayList<Spanned> list=new ArrayList<Spanned>();
|
||||
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
setContentView(R.layout.conversation);
|
||||
|
||||
// get conversation partner
|
||||
Bundle bundle = this.getIntent().getExtras();
|
||||
String partnerMail = bundle.getString("mail");
|
||||
receiver = partnerMail;
|
||||
String partnerName = bundle.getString("name");
|
||||
|
||||
// set title bar
|
||||
TextView title = (TextView) findViewById(R.id.titleText);
|
||||
title.setText(Html.fromHtml("Conversation with <b>" + partnerName + "</b>"));
|
||||
|
||||
// get mail
|
||||
SharedPreferences preferences = this.getSharedPreferences(PREFS_NAME, MODE_WORLD_READABLE);
|
||||
String mail = preferences.getString("mail", "");
|
||||
sender = mail;
|
||||
|
||||
// search results to string
|
||||
JSONObject j = MessagesHelper.getConversation(mail, partnerMail);
|
||||
|
||||
try {
|
||||
JSONObject json_data = null;
|
||||
String x;
|
||||
|
||||
|
||||
for(int i=0;i<j.length();i++)
|
||||
{
|
||||
x = (new Integer(j.length()-i-1)).toString();
|
||||
json_data = j.getJSONObject(x);
|
||||
|
||||
if(json_data.getString("sendermail").compareTo(mail) == 0)
|
||||
list.add(Html.fromHtml("<font color='#9fa6b3'><small>Ich:</small></font><br />"
|
||||
+ json_data.getString("message")));
|
||||
else
|
||||
list.add(Html.fromHtml("<font color='#9fa6b3'><small>"+json_data.getString("name")
|
||||
+":</small></font><br />" +
|
||||
"<font color='#2a78b9'>" + json_data.getString("message") + "</font>"));
|
||||
}
|
||||
|
||||
}
|
||||
catch(Exception e) {}
|
||||
|
||||
messageOverview = (ListView) findViewById(R.id.messageOverviewList);
|
||||
|
||||
adapter = new ArrayAdapter<Spanned>
|
||||
(this, R.layout.messsage_item, R.id.message_text, list);
|
||||
messageOverview.setAdapter(adapter);
|
||||
}
|
||||
|
||||
|
||||
public void messageSubmitHandler(View v)
|
||||
{
|
||||
View form = (View) v.getParent();
|
||||
|
||||
// get the input value
|
||||
EditText mText = (EditText) form.findViewById(R.id.messageinput);
|
||||
String text = mText.getText().toString();
|
||||
|
||||
// hide soft keyboard
|
||||
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.hideSoftInputFromWindow(mText.getWindowToken(), 0);
|
||||
|
||||
String response = MessagesHelper.insertMessage(this.sender, this.receiver, text);
|
||||
|
||||
// handle response
|
||||
if(response.trim().compareTo("01") != 0)
|
||||
Toast.makeText(getApplicationContext(), response, Toast.LENGTH_SHORT).show();
|
||||
else
|
||||
{
|
||||
Spanned mys = Html.fromHtml("<font color='#9fa6b3'><small>Ich:</small></font><br />" + text);
|
||||
list.add(mys);
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public void enterMenuHandler(View button)
|
||||
{
|
||||
Intent myIntent = new Intent(button.getContext(), FindMeMenu.class);
|
||||
startActivity(myIntent);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -22,6 +22,7 @@ public class FindMe extends Activity
|
||||
public static final String PREFS_NAME = "LoginCredentials";
|
||||
public StateHelper phoneState = new StateHelper();
|
||||
private static final String TAG = "test";
|
||||
private boolean showEntry = false;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
@@ -29,8 +30,7 @@ public class FindMe extends Activity
|
||||
super.onCreate(savedInstanceState);
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
|
||||
setContentView(R.layout.main);
|
||||
|
||||
FindMe.this.setContentView(R.layout.main);
|
||||
|
||||
String loginData[] = new String[3];
|
||||
|
||||
@@ -48,9 +48,9 @@ public class FindMe extends Activity
|
||||
if(response.compareTo("01") == 0)
|
||||
{
|
||||
Intent myIntent = new Intent(this, FindMeMenu.class);
|
||||
startActivity(myIntent);
|
||||
startActivity(myIntent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,20 +1,25 @@
|
||||
package com.architects.findme;
|
||||
|
||||
import com.architects.resources.*;
|
||||
|
||||
import android.R.drawable;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.Window;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
public class FindMeMenu extends Activity
|
||||
@@ -44,7 +49,7 @@ public class FindMeMenu extends Activity
|
||||
}
|
||||
public void messagesMenuHandler(View button)
|
||||
{
|
||||
Intent myIntent = new Intent(button.getContext(), Search.class);
|
||||
Intent myIntent = new Intent(button.getContext(), Messages.class);
|
||||
startActivity(myIntent);
|
||||
}
|
||||
public void meMenuHandler(View button)
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
package com.architects.findme;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import com.architects.findme.R;
|
||||
import com.architects.helper.*;
|
||||
|
||||
@@ -12,9 +7,7 @@ import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.location.Location;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
@@ -31,7 +24,7 @@ public class Friends extends Activity {
|
||||
private ListView friends;
|
||||
private ListView requests;
|
||||
public static final String PREFS_NAME = "LoginCredentials";
|
||||
private static final String TAG = "findme";
|
||||
//private static final String TAG = "findme";
|
||||
|
||||
private void setupTabHost() {
|
||||
mTabHost = (TabHost) findViewById(R.id.tabhost);
|
||||
@@ -57,12 +50,12 @@ public class Friends extends Activity {
|
||||
|
||||
String[] friendslist = FriendsHelper.getFriendsList(mail);
|
||||
String[] requestslist = FriendsHelper.getRequestsList(mail);
|
||||
|
||||
friends.setAdapter(new ArrayAdapter<String>
|
||||
friends.setAdapter(new ArrayAdapter<String>
|
||||
(this, R.layout.nearby_list_item, R.id.nearby_list_text, friendslist));
|
||||
requests.setAdapter(new ArrayAdapter<String>
|
||||
(this, R.layout.nearby_list_item,R.id.nearby_list_text, requestslist));
|
||||
|
||||
|
||||
setupTab(friends, "Friends");
|
||||
setupTab(requests, "Requests");
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class Login extends Activity
|
||||
super.onCreate(savedInstanceState);
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
|
||||
setContentView(R.layout.login);
|
||||
Login.this.setContentView(R.layout.login);
|
||||
}
|
||||
|
||||
public static String login(String[] str)
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
package com.architects.findme;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import com.architects.helper.*;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.text.Spanned;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.SimpleCursorAdapter;
|
||||
import android.widget.TabHost;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
|
||||
public class Messages extends Activity {
|
||||
public static final String PREFS_NAME = "LoginCredentials";
|
||||
private static final String TAG = "findme";
|
||||
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
setContentView(R.layout.message_overview);
|
||||
|
||||
// set title bar
|
||||
TextView title = (TextView) findViewById(R.id.titleText);
|
||||
title.setText("Conversations");
|
||||
|
||||
// get mail
|
||||
SharedPreferences preferences = this.getSharedPreferences(PREFS_NAME, MODE_WORLD_READABLE);
|
||||
String mail = preferences.getString("mail", "");
|
||||
|
||||
// search results to string
|
||||
JSONObject j = MessagesHelper.getConversationOverview(mail);
|
||||
|
||||
Spanned[] list = new Spanned[j.length()];
|
||||
final String[] mails = new String[j.length()];
|
||||
final String[] names = new String[j.length()];
|
||||
|
||||
try {
|
||||
JSONObject json_data = null;
|
||||
String x;
|
||||
|
||||
String text;
|
||||
for(int i=0;i<j.length();i++)
|
||||
{
|
||||
x = (new Integer(j.length()-i-1)).toString();
|
||||
json_data = j.getJSONObject(x);
|
||||
|
||||
mails[i] = json_data.getString("mail");
|
||||
names[i] = json_data.getString("name");
|
||||
|
||||
text = json_data.getString("message");//.substring(0, 20);
|
||||
list[i] = Html.fromHtml("<b>" + names[i] + "</b>" + "<br />" +
|
||||
"<small>@ " + json_data.getString("date") + "</small>");
|
||||
}
|
||||
|
||||
}
|
||||
catch(Exception e) {}
|
||||
|
||||
ListView messageOverview = (ListView) findViewById(R.id.messageOverviewList);
|
||||
|
||||
messageOverview.setAdapter(new ArrayAdapter<Spanned>
|
||||
(this, R.layout.message_overview_item, R.id.message_overview_text, list));
|
||||
|
||||
|
||||
messageOverview.setTextFilterEnabled(true);
|
||||
|
||||
messageOverview.setOnItemClickListener(new OnItemClickListener() {
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("mail", mails[position]);
|
||||
bundle.putString("name", names[position]);
|
||||
|
||||
Intent newIntent = new Intent(getApplicationContext(), Conversation.class);
|
||||
newIntent.putExtras(bundle);
|
||||
startActivityForResult(newIntent, 0);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
resultsList.setAdapter(new ArrayAdapter<String>(this, R.layout.nearby_list_item, R.id.nearby_list_text, results));
|
||||
|
||||
resultsList.setTextFilterEnabled(true);
|
||||
|
||||
resultsList.setOnItemClickListener(new OnItemClickListener() {
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
// When clicked, show a toast with the TextView text
|
||||
Toast.makeText(getApplicationContext(), ((TextView) view).getText(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});*/
|
||||
}
|
||||
|
||||
public void enterMenuHandler(View button)
|
||||
{
|
||||
Intent myIntent = new Intent(button.getContext(), FindMeMenu.class);
|
||||
startActivity(myIntent);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
package com.architects.findme;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import com.architects.findme.R;
|
||||
import com.architects.helper.*;
|
||||
import android.app.Activity;
|
||||
import android.app.ListActivity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.location.Location;
|
||||
@@ -17,13 +15,10 @@ import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TabHost;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
@@ -156,29 +151,7 @@ public class Nearby extends Activity {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// VIEWS
|
||||
public void drawNearbyHandler(View button)
|
||||
{
|
||||
Intent myIntent = new Intent(button.getContext(), Nearby.class);
|
||||
startActivity(myIntent);
|
||||
}
|
||||
public void drawFriendsHandler(View button)
|
||||
{
|
||||
Intent myIntent = new Intent(button.getContext(), Friends.class);
|
||||
startActivity(myIntent);
|
||||
}
|
||||
public void drawChatHandler(View button)
|
||||
{
|
||||
Intent myIntent = new Intent(button.getContext(), Chat.class);
|
||||
startActivity(myIntent);
|
||||
}
|
||||
public void drawSearchHandler(View button)
|
||||
{
|
||||
Intent myIntent = new Intent(button.getContext(), Search.class);
|
||||
startActivity(myIntent);
|
||||
}
|
||||
|
||||
|
||||
public void enterMenuHandler(View button)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ public class Registration extends Activity
|
||||
super.onCreate(savedInstanceState);
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
|
||||
setContentView(R.layout.registration);
|
||||
Registration.this.setContentView(R.layout.registration);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -36,6 +37,10 @@ public class Search extends Activity {
|
||||
Bundle bundle = this.getIntent().getExtras();
|
||||
String query = bundle.getString("query");
|
||||
|
||||
// set title bar
|
||||
TextView title = (TextView) findViewById(R.id.titleText);
|
||||
title.setText(Html.fromHtml("Results for <b>"+query+"</b>"));
|
||||
|
||||
// get results list view
|
||||
resultsList = (ListView) findViewById(R.id.searchList);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import android.util.Log;
|
||||
|
||||
public class AccountHelper
|
||||
{
|
||||
private static final String TAG = "test";
|
||||
private static final String TAG = "findme";
|
||||
|
||||
public static String doHttpPost(String url_end, JSONObject j)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.architects.helper;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import com.architects.findme.R;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.util.Log;
|
||||
import android.widget.ArrayAdapter;
|
||||
|
||||
public class MessagesHelper
|
||||
{
|
||||
private static final String TAG = "test";
|
||||
|
||||
public static JSONObject getConversationOverview(String user)
|
||||
{
|
||||
JSONObject j = new JSONObject();
|
||||
String params = "?type=overview&sender="+user;
|
||||
j = AccountHelper.doHttpGet("get_message.php", params);
|
||||
|
||||
return j;
|
||||
}
|
||||
|
||||
public static JSONObject getConversation(String user, String partner)
|
||||
{
|
||||
JSONObject j = new JSONObject();
|
||||
String params = "?type=conversation&sender="+user+"&receiver="+partner;
|
||||
j = AccountHelper.doHttpGet("get_message.php", params);
|
||||
|
||||
return j;
|
||||
}
|
||||
|
||||
public static String insertMessage(String sender, String receiver, String message)
|
||||
{
|
||||
JSONObject j = new JSONObject();
|
||||
try
|
||||
{
|
||||
j.put("sender", sender);
|
||||
j.put("receiver", receiver);
|
||||
j.put("message", message);
|
||||
|
||||
return AccountHelper.doHttpPost("message.php", j);
|
||||
}
|
||||
catch (JSONException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user