Changed messages screen. Added icon into action bar
This commit is contained in:
parent
309ccf4f9b
commit
a8b9bb03ad
@ -11,12 +11,11 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toLeftOf="@+id/addRcv" >
|
||||
android:layout_alignParentTop="true" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/message_receivers_text"
|
||||
android:layout_width="254dp"
|
||||
android:layout_width="320dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/message_receivers_title"
|
||||
@ -48,14 +47,6 @@
|
||||
android:textColor="@color/foreground1" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/addRcv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/linearLayout2"
|
||||
android:layout_alignParentRight="true"
|
||||
android:src="@drawable/ic_action_add_person" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
11
SWADroid/res/menu/messages_main_activity_actions.xml
Normal file
11
SWADroid/res/menu/messages_main_activity_actions.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:swadroid="http://schemas.android.com/apk/res-auto" >
|
||||
|
||||
<item
|
||||
android:id="@+id/action_addUser"
|
||||
android:icon="@drawable/ic_action_add_person"
|
||||
android:title="@string/actionBarAddUser"
|
||||
swadroid:showAsAction="ifRoom|withText"/>
|
||||
|
||||
</menu>
|
@ -343,4 +343,6 @@
|
||||
|
||||
<string name="actionBarRefresh">Actualitzar</string>
|
||||
<string name="actionBarSave">Desa</string>
|
||||
|
||||
<string name="actionBarAddUser">Afegir Usuari</string>
|
||||
</resources>
|
@ -382,4 +382,6 @@
|
||||
|
||||
<string name="actionBarRefresh">Actualizar</string>
|
||||
<string name="actionBarSave">Guardar</string>
|
||||
|
||||
<string name="actionBarAddUser">Agregar usuario</string>
|
||||
</resources>
|
@ -382,4 +382,6 @@
|
||||
|
||||
<string name="actionBarRefresh">Refresh</string>
|
||||
<string name="actionBarSave">Save</string>
|
||||
|
||||
<string name="actionBarAddUser">Add User</string>
|
||||
</resources>
|
@ -30,12 +30,12 @@ public class FilterUsersList extends MenuActivity {
|
||||
cancelFIlters.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
public void onClick(View v) {
|
||||
setResult(RESULT_CANCELED);
|
||||
//setResult(RESULT_CANCELED);
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
Button acceptFIlters = (Button) findViewById(R.id.cancelFilters);
|
||||
Button acceptFIlters = (Button) findViewById(R.id.acceptFilters);
|
||||
acceptFIlters.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
public void onClick(View v) {
|
||||
|
@ -24,6 +24,8 @@ import org.ksoap2.serialization.SoapObject;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
@ -86,7 +88,7 @@ public class Messages extends Module {
|
||||
|
||||
setMETHOD_NAME("sendMessage");
|
||||
|
||||
ImageButton add = (ImageButton) findViewById(R.id.addRcv);
|
||||
/*ImageButton add = (ImageButton) findViewById(R.id.addRcv);
|
||||
add.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
public void onClick(View v) {
|
||||
@ -94,7 +96,7 @@ public class Messages extends Module {
|
||||
startActivity(callUsersList);
|
||||
|
||||
}
|
||||
});
|
||||
}); */
|
||||
|
||||
Button send = (Button) findViewById(R.id.sendMsg);
|
||||
send.setOnClickListener(new View.OnClickListener() {
|
||||
@ -275,4 +277,27 @@ public class Messages extends Module {
|
||||
|
||||
super.onSaveInstanceState(outState);
|
||||
}
|
||||
|
||||
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.messages_main_activity_actions, menu);
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.action_addUser:
|
||||
|
||||
Intent callUsersList = new Intent (getBaseContext(), UsersList.class);
|
||||
startActivity(callUsersList);
|
||||
|
||||
return true;
|
||||
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user