我尝试在一个盒子安卓应用程序中更改cat的布局,但它并不适用于所有人 我想显示如下界面:
但他显示如下:
xml代码:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/message"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="5sp"
android:background="@drawable/speech_bubble_green"
android:shadowDx="1"
android:shadowDy="1"
android:autoLink="all"
android:linksClickable="true"
android:text="Medium Text"
android:textSize="20sp" />
<LinearLayout
android:id="@+id/tools"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</LinearLayout>
</LinearLayout>
java代码:
public class MessageActivity extends Activity
{
/**
* On create
*/
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.message);
((TextView) findViewById(R.id.message)).setText(
getIntent().getExtras().getString(Extra.MESSAGE)
);
}
}
答案 0 :(得分:0)
您生成的视图是泡泡聊天视图,需要聊天九个补丁图片。如果你想探索想法看到这个链接
https://github.com/AdilSoomro/Android-Speech-Bubble
http://adilsoomro.blogspot.in/2012/12/android-listview-with-speech-bubble.html