mirror of
https://github.com/moparisthebest/Yaaic
synced 2025-01-09 04:38:08 -05:00
Allow copy&paste of text in ConversationActivity. Fixes #118.
This commit is contained in:
parent
81b7fe798c
commit
c1f2648628
@ -47,6 +47,7 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:inputType="textImeMultiLine"
|
android:inputType="textImeMultiLine"
|
||||||
|
android:textIsSelectable="true"
|
||||||
android:imeOptions="actionSend" />
|
android:imeOptions="actionSend" />
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/speech"
|
android:id="@+id/speech"
|
||||||
|
@ -25,9 +25,11 @@ import java.util.Date;
|
|||||||
import org.yaaic.utils.MircColors;
|
import org.yaaic.utils.MircColors;
|
||||||
import org.yaaic.utils.Smilies;
|
import org.yaaic.utils.Smilies;
|
||||||
|
|
||||||
|
import android.annotation.TargetApi;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.os.Build;
|
||||||
import android.text.Spannable;
|
import android.text.Spannable;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
@ -333,9 +335,18 @@ public class Message
|
|||||||
canvas.setTypeface(Typeface.MONOSPACE);
|
canvas.setTypeface(Typeface.MONOSPACE);
|
||||||
canvas.setTextColor(COLOR_DEFAULT);
|
canvas.setTextColor(COLOR_DEFAULT);
|
||||||
|
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||||
|
setupViewForHoneycombAndLater(canvas);
|
||||||
|
}
|
||||||
|
|
||||||
return canvas;
|
return canvas;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TargetApi(11)
|
||||||
|
private void setupViewForHoneycombAndLater(TextView canvas) {
|
||||||
|
canvas.setTextIsSelectable(true);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a timestamp
|
* Generate a timestamp
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user