mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-02-17 04:00:48 +01:00
parent
89dfb392ad
commit
bf4f686d7d
@ -1,4 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2017 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation, either version 3 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<manifest
|
||||
package="org.mariotaku.twidere"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
@ -173,7 +173,7 @@ public class KeyboardShortcutsHandler implements KeyboardShortcutConstants {
|
||||
return true;
|
||||
}
|
||||
case ACTION_MESSAGE: {
|
||||
IntentUtils.INSTANCE.openMessageConversation(context, null, null);
|
||||
// TODO: open message creator
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1,22 +0,0 @@
|
||||
package org.mariotaku.twidere.view.holder;
|
||||
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
|
||||
import org.mariotaku.twidere.R;
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 14/11/19.
|
||||
*/
|
||||
public class LoadIndicatorViewHolder extends RecyclerView.ViewHolder {
|
||||
private final View loadProgress;
|
||||
|
||||
public LoadIndicatorViewHolder(View view) {
|
||||
super(view);
|
||||
loadProgress = view.findViewById(R.id.load_progress);
|
||||
}
|
||||
|
||||
public void setLoadProgressVisible(boolean visible) {
|
||||
loadProgress.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
}
|
@ -835,7 +835,9 @@ class HomeActivity : BaseActivity(), OnClickListener, OnPageChangeListener, Supp
|
||||
if (pagerAdapter.count == 0) return
|
||||
val tab = pagerAdapter.getTab(position)
|
||||
when (tab.cls) {
|
||||
MessagesEntriesFragment::class.java -> IntentUtils.openMessageConversation(this, null, null)
|
||||
MessagesEntriesFragment::class.java -> {
|
||||
//TODO: open message creator
|
||||
}
|
||||
TrendsSuggestionsFragment::class.java -> openSearchView(null)
|
||||
else -> startActivity(Intent(INTENT_ACTION_COMPOSE))
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import android.view.ViewGroup
|
||||
import org.mariotaku.twidere.adapter.iface.IItemCountsAdapter
|
||||
import org.mariotaku.twidere.model.ItemCounts
|
||||
import org.mariotaku.twidere.model.ParcelableMessageConversation
|
||||
import org.mariotaku.twidere.view.holder.MessageConversationViewHolder
|
||||
import org.mariotaku.twidere.view.holder.message.MessageConversationViewHolder
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 2017/2/9.
|
||||
|
@ -1,3 +1,19 @@
|
||||
package org.mariotaku.twidere.fragment
|
||||
|
||||
class MessagesConversationFragment : BaseFragment()
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import org.mariotaku.twidere.R
|
||||
|
||||
class MessagesConversationFragment : BaseFragment() {
|
||||
|
||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
||||
super.onActivityCreated(savedInstanceState)
|
||||
|
||||
}
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
||||
return inflater.inflate(R.layout.fragment_messages_conversation, container, false)
|
||||
}
|
||||
|
||||
}
|
@ -256,10 +256,12 @@ abstract class BaseFiltersFragment : AbsContentListViewFragment<SimpleCursorAdap
|
||||
val id = arguments.getLong(EXTRA_ID, -1)
|
||||
val resolver = context.contentResolver
|
||||
if (id >= 0) {
|
||||
val where = Expression.equalsArgs(Filters._ID).sql
|
||||
val whereArgs = arrayOf(id.toString())
|
||||
if (DataStoreUtils.queryCount(context, uri, where, whereArgs) == 0) {
|
||||
resolver.update(uri, values, where, whereArgs)
|
||||
val valueWhere = Expression.equalsArgs(Filters.VALUE).sql
|
||||
val valueWhereArgs = arrayOf(text)
|
||||
val idWhere = Expression.equalsArgs(Filters._ID).sql
|
||||
val idWhereArgs = arrayOf(id.toString())
|
||||
if (DataStoreUtils.queryCount(context, uri, valueWhere, valueWhereArgs) == 0) {
|
||||
resolver.update(uri, values, idWhere, idWhereArgs)
|
||||
} else {
|
||||
Toast.makeText(context, R.string.message_toast_duplicate_filter_rule,
|
||||
Toast.LENGTH_SHORT).show()
|
||||
|
@ -279,16 +279,12 @@ object IntentUtils {
|
||||
return builder.build()
|
||||
}
|
||||
|
||||
fun openMessageConversation(context: Context, accountKey: UserKey?, conversationId: String?) {
|
||||
fun openMessageConversation(context: Context, accountKey: UserKey, conversationId: String) {
|
||||
val builder = Uri.Builder()
|
||||
builder.scheme(SCHEME_TWIDERE)
|
||||
builder.authority(AUTHORITY_DIRECT_MESSAGES_CONVERSATION)
|
||||
if (accountKey != null) {
|
||||
builder.appendQueryParameter(QUERY_PARAM_ACCOUNT_KEY, accountKey.toString())
|
||||
if (conversationId != null) {
|
||||
builder.appendQueryParameter(QUERY_PARAM_CONVERSATION_ID, conversationId)
|
||||
}
|
||||
}
|
||||
builder.appendQueryParameter(QUERY_PARAM_ACCOUNT_KEY, accountKey.toString())
|
||||
builder.appendQueryParameter(QUERY_PARAM_CONVERSATION_ID, conversationId)
|
||||
val intent = Intent(Intent.ACTION_VIEW, builder.build())
|
||||
intent.`package` = BuildConfig.APPLICATION_ID
|
||||
context.startActivity(intent)
|
||||
|
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2017 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.view.holder
|
||||
|
||||
import android.support.v7.widget.RecyclerView
|
||||
import android.view.View
|
||||
import kotlinx.android.synthetic.main.list_item_load_indicator.view.*
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 14/11/19.
|
||||
*/
|
||||
class LoadIndicatorViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
private val loadProgress by lazy { itemView.loadProgress }
|
||||
|
||||
fun setLoadProgressVisible(visible: Boolean) {
|
||||
loadProgress.visibility = if (visible) View.VISIBLE else View.GONE
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2017 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.view.holder.message
|
||||
|
||||
import android.support.v7.widget.RecyclerView
|
||||
import android.view.View
|
||||
import org.mariotaku.twidere.model.ParcelableMessage
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 2017/2/9.
|
||||
*/
|
||||
|
||||
abstract class AbsMessageViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
open fun display(message: ParcelableMessage) {
|
||||
|
||||
}
|
||||
}
|
@ -1,4 +1,23 @@
|
||||
package org.mariotaku.twidere.view.holder
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2017 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.view.holder.message
|
||||
|
||||
import android.support.v7.widget.RecyclerView
|
||||
import android.view.View
|
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2017 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.view.holder.message
|
||||
|
||||
import android.view.View
|
||||
import kotlinx.android.synthetic.main.list_item_message_conversation_text.view.*
|
||||
import org.mariotaku.twidere.R
|
||||
import org.mariotaku.twidere.model.ParcelableMessage
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 2017/2/9.
|
||||
*/
|
||||
|
||||
class MessageViewHolder(itemView: View) : AbsMessageViewHolder(itemView) {
|
||||
|
||||
private val text by lazy { itemView.text }
|
||||
|
||||
override fun display(message: ParcelableMessage) {
|
||||
super.display(message)
|
||||
text.text = message.text_unescaped
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val layoutResource = R.layout.list_item_message_conversation_text
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2017 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.view.holder.message
|
||||
|
||||
import android.view.View
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 2017/2/9.
|
||||
*/
|
||||
|
||||
class StickerMessageViewHolder(itemView: View) : AbsMessageViewHolder(itemView) {
|
||||
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation, either version 3 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:showIn="@layout/card_item_message_conversation_incoming">
|
||||
|
||||
<org.mariotaku.twidere.view.CardMediaContainer
|
||||
android:id="@+id/media_preview_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include layout="@layout/layout_card_media_preview"/>
|
||||
|
||||
</org.mariotaku.twidere.view.CardMediaContainer>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/media_preview_container"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/element_spacing_normal">
|
||||
|
||||
<org.mariotaku.twidere.view.TimelineContentTextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:text="@string/sample_status_text"/>
|
||||
|
||||
<org.mariotaku.twidere.view.FixedTextView
|
||||
android:id="@+id/time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/element_spacing_small"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:text="12:00"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation, either version 3 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp">
|
||||
|
||||
<org.mariotaku.twidere.view.ProfileImageView
|
||||
android:id="@+id/profileImage"
|
||||
style="?profileImageStyle"
|
||||
android:layout_width="@dimen/icon_size_card_list_item"
|
||||
android:layout_height="@dimen/icon_size_card_list_item"
|
||||
android:layout_alignTop="@+id/messageContent"/>
|
||||
|
||||
<org.mariotaku.messagebubbleview.library.MessageBubbleView
|
||||
android:id="@+id/messageContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start"
|
||||
android:layout_toEndOf="@+id/profileImage"
|
||||
android:layout_toRightOf="@+id/profileImage"
|
||||
app:bubbleColor="?colorAccent"
|
||||
app:caretHeight="8dp"
|
||||
app:caretPosition="topStart"
|
||||
app:caretWidth="8dp"
|
||||
app:cornerRadius="2dp">
|
||||
|
||||
<include layout="@layout/card_item_message_conversation_common"/>
|
||||
</org.mariotaku.messagebubbleview.library.MessageBubbleView>
|
||||
|
||||
</RelativeLayout>
|
@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation, either version 3 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp">
|
||||
|
||||
<org.mariotaku.messagebubbleview.library.MessageBubbleView
|
||||
android:id="@+id/messageContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
app:bubbleColor="?messageBubbleColor"
|
||||
app:caretHeight="8dp"
|
||||
app:caretPosition="bottomEnd"
|
||||
app:caretWidth="8dp"
|
||||
app:cornerRadius="2dp">
|
||||
|
||||
<include layout="@layout/card_item_message_conversation_common"/>
|
||||
</org.mariotaku.messagebubbleview.library.MessageBubbleView>
|
||||
|
||||
</FrameLayout>
|
@ -17,175 +17,119 @@
|
||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<FrameLayout
|
||||
<RelativeLayout
|
||||
android:id="@+id/conversationContainer"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="visible"
|
||||
tools:context=".fragment.MessagesConversationFragment">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/conversationContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/listContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/inputPanel">
|
||||
|
||||
<org.mariotaku.twidere.view.ExtendedRecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/inputPanelShadowCompat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/element_spacing_small"
|
||||
android:layout_above="@+id/inputPanel"
|
||||
android:background="@drawable/shadow_top"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/inputPanel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="?android:colorBackground"
|
||||
android:gravity="bottom"
|
||||
android:orientation="horizontal"
|
||||
android:outlineProvider="bounds"
|
||||
android:padding="@dimen/element_spacing_normal"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:id="@+id/addImage"
|
||||
android:layout_width="@dimen/element_size_normal"
|
||||
android:layout_height="@dimen/element_size_normal"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:background="?selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:color="?android:textColorSecondary"
|
||||
android:contentDescription="@string/add_image"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/ic_action_gallery"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:id="@+id/sendMessage"
|
||||
android:layout_width="@dimen/element_size_normal"
|
||||
android:layout_height="@dimen/element_size_normal"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="?selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:color="?android:textColorSecondary"
|
||||
android:contentDescription="@string/action_send"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/ic_action_send"/>
|
||||
|
||||
<org.mariotaku.messagebubbleview.library.MessageBubbleView
|
||||
android:id="@+id/editTextContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignWithParentIfMissing="true"
|
||||
android:layout_gravity="end"
|
||||
android:layout_toEndOf="@+id/addImage"
|
||||
android:layout_toLeftOf="@+id/sendMessage"
|
||||
android:layout_toRightOf="@+id/addImage"
|
||||
android:layout_toStartOf="@+id/sendMessage"
|
||||
app:bubbleColor="?messageBubbleColor"
|
||||
app:caretHeight="8dp"
|
||||
app:caretPosition="topEnd"
|
||||
app:caretWidth="8dp"
|
||||
app:cornerRadius="2dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/element_size_normal"
|
||||
android:padding="@dimen/element_spacing_normal">
|
||||
|
||||
<org.mariotaku.twidere.view.ComposeEditText
|
||||
android:id="@+id/editText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@null"
|
||||
android:completionThreshold="1"
|
||||
android:focusable="true"
|
||||
android:gravity="start|center_vertical"
|
||||
android:hint="@string/type_to_compose"
|
||||
android:inputType="textShortMessage|textMultiLine|textCapSentences"
|
||||
android:maxHeight="140dp"
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textColorHint="?android:textColorTertiary">
|
||||
|
||||
<requestFocus/>
|
||||
</org.mariotaku.twidere.view.ComposeEditText>
|
||||
|
||||
</FrameLayout>
|
||||
</org.mariotaku.messagebubbleview.library.MessageBubbleView>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/recipientSelectorContainer"
|
||||
android:id="@+id/listContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="visible"
|
||||
tools:visibility="gone">
|
||||
android:layout_above="@+id/inputPanel">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/usersSearchList"
|
||||
<org.mariotaku.twidere.view.ExtendedRecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="@dimen/element_spacing_normal"
|
||||
android:paddingRight="@dimen/element_spacing_normal"
|
||||
android:scrollbarStyle="outsideInset"/>
|
||||
android:scrollbars="vertical"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/usersSearchEmpty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/element_spacing_normal"
|
||||
android:paddingRight="@dimen/element_spacing_normal">
|
||||
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:color="?android:textColorSecondary"
|
||||
android:src="@drawable/ic_info_search"/>
|
||||
|
||||
<org.mariotaku.twidere.view.FixedTextView
|
||||
android:id="@+id/usersSearchEmptyText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/element_spacing_normal"
|
||||
android:gravity="center"
|
||||
android:textAppearance="?android:textAppearanceMedium"/>
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/usersSearchProgress"
|
||||
style="?android:progressBarStyleLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone"/>
|
||||
</FrameLayout>
|
||||
|
||||
</FrameLayout>
|
||||
<View
|
||||
android:id="@+id/inputPanelShadowCompat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/element_spacing_small"
|
||||
android:layout_above="@+id/inputPanel"
|
||||
android:background="@drawable/shadow_top"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/inputPanel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="?android:colorBackground"
|
||||
android:gravity="bottom"
|
||||
android:orientation="horizontal"
|
||||
android:outlineProvider="bounds"
|
||||
android:padding="@dimen/element_spacing_normal"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:id="@+id/addImage"
|
||||
android:layout_width="@dimen/element_size_normal"
|
||||
android:layout_height="@dimen/element_size_normal"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:background="?selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:color="?android:textColorSecondary"
|
||||
android:contentDescription="@string/add_image"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/ic_action_gallery"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<org.mariotaku.twidere.view.IconActionView
|
||||
android:id="@+id/sendMessage"
|
||||
android:layout_width="@dimen/element_size_normal"
|
||||
android:layout_height="@dimen/element_size_normal"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="?selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:color="?android:textColorSecondary"
|
||||
android:contentDescription="@string/action_send"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/ic_action_send"/>
|
||||
|
||||
<org.mariotaku.messagebubbleview.library.MessageBubbleView
|
||||
android:id="@+id/editTextContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignWithParentIfMissing="true"
|
||||
android:layout_gravity="end"
|
||||
android:layout_toEndOf="@+id/addImage"
|
||||
android:layout_toLeftOf="@+id/sendMessage"
|
||||
android:layout_toRightOf="@+id/addImage"
|
||||
android:layout_toStartOf="@+id/sendMessage"
|
||||
app:bubbleColor="?messageBubbleColor"
|
||||
app:caretHeight="8dp"
|
||||
app:caretPosition="topEnd"
|
||||
app:caretWidth="8dp"
|
||||
app:cornerRadius="2dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/element_size_normal"
|
||||
android:padding="@dimen/element_spacing_normal">
|
||||
|
||||
<org.mariotaku.twidere.view.ComposeEditText
|
||||
android:id="@+id/editText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@null"
|
||||
android:completionThreshold="1"
|
||||
android:focusable="true"
|
||||
android:gravity="start|center_vertical"
|
||||
android:hint="@string/type_to_compose"
|
||||
android:inputType="textShortMessage|textMultiLine|textCapSentences"
|
||||
android:maxHeight="140dp"
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textColorHint="?android:textColorTertiary">
|
||||
|
||||
<requestFocus/>
|
||||
</org.mariotaku.twidere.view.ComposeEditText>
|
||||
|
||||
</FrameLayout>
|
||||
</org.mariotaku.messagebubbleview.library.MessageBubbleView>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
@ -25,7 +25,7 @@
|
||||
android:focusable="true">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/load_progress"
|
||||
android:id="@+id/loadProgress"
|
||||
style="?android:progressBarStyleLarge"
|
||||
android:layout_width="@dimen/element_size_normal"
|
||||
android:layout_height="@dimen/element_size_normal"
|
||||
|
@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation, either version 3 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp">
|
||||
|
||||
<org.mariotaku.messagebubbleview.library.MessageBubbleView
|
||||
android:id="@+id/messageContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start"
|
||||
app:bubbleColor="?colorAccent"
|
||||
app:caretHeight="8dp"
|
||||
app:caretPosition="topStart"
|
||||
app:caretWidth="8dp"
|
||||
app:cornerRadius="2dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<org.mariotaku.twidere.view.CardMediaContainer
|
||||
android:id="@+id/mediaPreview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include layout="@layout/layout_card_media_preview"/>
|
||||
|
||||
</org.mariotaku.twidere.view.CardMediaContainer>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/media_preview_container"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/element_spacing_normal">
|
||||
|
||||
<org.mariotaku.twidere.view.TimelineContentTextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:text="@string/sample_status_text"/>
|
||||
|
||||
<org.mariotaku.twidere.view.FixedTextView
|
||||
android:id="@+id/time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/element_spacing_small"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:text="12:00"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</org.mariotaku.messagebubbleview.library.MessageBubbleView>
|
||||
|
||||
</RelativeLayout>
|
@ -98,6 +98,7 @@
|
||||
android:layout_alignStart="@+id/name"
|
||||
android:layout_below="@+id/name"
|
||||
android:layout_marginTop="@dimen/element_spacing_xsmall"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
tools:text="@string/sample_status_text"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user