Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xabber-android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
xabber-android
Commits
9f7fa554
Commit
9f7fa554
authored
Feb 20, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chat_viewer_item layout refactored, chat_page removed, button replaced with image button and icon.
parent
48a33eee
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
80 deletions
+42
-80
ChatViewerFragment.java
...c/main/java/com/xabber/android/ui/ChatViewerFragment.java
+0
-25
ic_send_white_24dp.png
app/src/main/res/drawable-hdpi/ic_send_white_24dp.png
+0
-0
ic_send_white_24dp.png
app/src/main/res/drawable-mdpi/ic_send_white_24dp.png
+0
-0
ic_send_white_24dp.png
app/src/main/res/drawable-xhdpi/ic_send_white_24dp.png
+0
-0
ic_send_white_24dp.png
app/src/main/res/drawable-xxhdpi/ic_send_white_24dp.png
+0
-0
ic_send_white_24dp.png
app/src/main/res/drawable-xxxhdpi/ic_send_white_24dp.png
+0
-0
chat_viewer_item.xml
app/src/main/res/layout/chat_viewer_item.xml
+42
-55
No files found.
app/src/main/java/com/xabber/android/ui/ChatViewerFragment.java
View file @
9f7fa554
...
@@ -14,8 +14,6 @@ import android.view.MenuInflater;
...
@@ -14,8 +14,6 @@ import android.view.MenuInflater;
import
android.view.MenuItem
;
import
android.view.MenuItem
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
import
android.view.animation.Animation
;
import
android.view.animation.AnimationUtils
;
import
android.view.inputmethod.EditorInfo
;
import
android.view.inputmethod.EditorInfo
;
import
android.view.inputmethod.InputMethodManager
;
import
android.view.inputmethod.InputMethodManager
;
import
android.widget.AdapterView
;
import
android.widget.AdapterView
;
...
@@ -36,7 +34,6 @@ public class ChatViewerFragment extends Fragment {
...
@@ -36,7 +34,6 @@ public class ChatViewerFragment extends Fragment {
public
static
final
String
ARGUMENT_ACCOUNT
=
"ARGUMENT_ACCOUNT"
;
public
static
final
String
ARGUMENT_ACCOUNT
=
"ARGUMENT_ACCOUNT"
;
public
static
final
String
ARGUMENT_USER
=
"ARGUMENT_USER"
;
public
static
final
String
ARGUMENT_USER
=
"ARGUMENT_USER"
;
private
TextView
pageView
;
private
EditText
inputView
;
private
EditText
inputView
;
private
ListView
listView
;
private
ListView
listView
;
private
ChatMessageAdapter
chatMessageAdapter
;
private
ChatMessageAdapter
chatMessageAdapter
;
...
@@ -69,27 +66,6 @@ public class ChatViewerFragment extends Fragment {
...
@@ -69,27 +66,6 @@ public class ChatViewerFragment extends Fragment {
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
super
.
onCreateView
(
inflater
,
container
,
savedInstanceState
);
super
.
onCreateView
(
inflater
,
container
,
savedInstanceState
);
/*
Animation used to hide pages.
*/
Animation
pagesHideAnimation
=
AnimationUtils
.
loadAnimation
(
getActivity
(),
R
.
anim
.
chat_page_out
);
pagesHideAnimation
.
setAnimationListener
(
new
Animation
.
AnimationListener
()
{
@Override
public
void
onAnimationStart
(
Animation
animation
)
{
}
@Override
public
void
onAnimationEnd
(
Animation
animation
)
{
pageView
.
setVisibility
(
View
.
GONE
);
}
@Override
public
void
onAnimationRepeat
(
Animation
animation
)
{
}
});
View
view
=
inflater
.
inflate
(
R
.
layout
.
chat_viewer_item
,
container
,
false
);
View
view
=
inflater
.
inflate
(
R
.
layout
.
chat_viewer_item
,
container
,
false
);
chatMessageAdapter
=
new
ChatMessageAdapter
(
getActivity
());
chatMessageAdapter
=
new
ChatMessageAdapter
(
getActivity
());
...
@@ -98,7 +74,6 @@ public class ChatViewerFragment extends Fragment {
...
@@ -98,7 +74,6 @@ public class ChatViewerFragment extends Fragment {
listView
=
(
ListView
)
view
.
findViewById
(
android
.
R
.
id
.
list
);
listView
=
(
ListView
)
view
.
findViewById
(
android
.
R
.
id
.
list
);
listView
.
setAdapter
(
chatMessageAdapter
);
listView
.
setAdapter
(
chatMessageAdapter
);
pageView
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
chat_page
);
inputView
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
chat_input
);
inputView
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
chat_input
);
view
.
findViewById
(
R
.
id
.
chat_send
).
setOnClickListener
(
view
.
findViewById
(
R
.
id
.
chat_send
).
setOnClickListener
(
...
...
app/src/main/res/drawable-hdpi/ic_send_white_24dp.png
0 → 100644
View file @
9f7fa554
351 Bytes
app/src/main/res/drawable-mdpi/ic_send_white_24dp.png
0 → 100644
View file @
9f7fa554
292 Bytes
app/src/main/res/drawable-xhdpi/ic_send_white_24dp.png
0 → 100644
View file @
9f7fa554
446 Bytes
app/src/main/res/drawable-xxhdpi/ic_send_white_24dp.png
0 → 100644
View file @
9f7fa554
562 Bytes
app/src/main/res/drawable-xxxhdpi/ic_send_white_24dp.png
0 → 100644
View file @
9f7fa554
747 Bytes
app/src/main/res/layout/chat_viewer_item.xml
View file @
9f7fa554
...
@@ -12,66 +12,53 @@
...
@@ -12,66 +12,53 @@
You should have received a copy of the GNU General Public License,
You should have received a copy of the GNU General Public License,
along with this program. If not, see http://www.gnu.org/licenses/.
along with this program. If not, see http://www.gnu.org/licenses/.
-->
-->
<
Linear
Layout
<
Relative
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:padding=
"4dip"
>
>
<RelativeLayout
<ListView
android:id=
"@android:id/list"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
>
android:stackFromBottom=
"true"
<ListView
android:transcriptMode=
"normal"
android:id=
"@android:id/list"
android:smoothScrollbar=
"false"
android:layout_width=
"match_parent"
android:divider=
"@null"
android:layout_height=
"match_parent"
android:dividerHeight=
"0dp"
android:layout_weight=
"1"
android:layout_above=
"@+id/chat_input"
android:padding=
"4dip"
/>
android:stackFromBottom=
"true"
android:transcriptMode=
"normal"
<EditText
android:smoothScrollbar=
"false"
android:id=
"@+id/chat_input"
android:divider=
"@null"
android:inputType=
"textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"
android:dividerHeight=
"0dp"
android:cursorVisible=
"true"
/>
android:hint=
"@string/chat_input_hint"
<TextView
android:layout_width=
"0dp"
android:id=
"@+id/chat_page"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:padding=
"4dip"
android:textSize=
"12sp"
android:gravity=
"center"
android:visibility=
"gone"
android:background=
"?android:attr/colorBackground"
android:text=
"@string/chat_page"
/>
</RelativeLayout>
<LinearLayout
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingTop=
"4dip"
>
android:maxLines=
"5"
<EditText
android:scrollbars=
"vertical"
android:id=
"@+id/chat_input"
android:fadingEdge=
"vertical"
android:layout_weight=
"1"
android:focusable=
"true"
android:inputType=
"textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"
android:descendantFocusability=
"beforeDescendants"
android:imeOptions=
"actionSend|flagNoEnterAction"
android:cursorVisible=
"true"
android:layout_alignParentLeft=
"true"
android:hint=
"@string/chat_input_hint"
android:layout_alignParentStart=
"true"
android:layout_width=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_height=
"match_parent"
android:layout_toLeftOf=
"@+id/chat_send"
android:maxLines=
"5"
android:layout_toStartOf=
"@+id/chat_send"
/>
android:scrollbars=
"vertical"
android:fadingEdge=
"vertical"
<ImageButton
android:focusable=
"true"
android:id=
"@+id/chat_send"
android:descendantFocusability=
"beforeDescendants"
android:layout_width=
"wrap_content"
/>
android:layout_height=
"wrap_content"
<Button
android:layout_alignParentBottom=
"true"
android:text=
"@string/chat_send"
android:layout_alignParentRight=
"true"
android:id=
"@+id/chat_send"
android:layout_alignParentEnd=
"true"
android:layout_width=
"wrap_content"
android:src=
"@drawable/ic_send_white_24dp"
android:layout_height=
"match_parent"
android:contentDescription=
"@string/chat_send"
/>
/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment