亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

安卓程序unfortunately, has stopped 怎么處理?

安卓程序unfortunately, has stopped 怎么處理?

Js_Ly 2016-03-26 20:05:58
/*這是activity*/package com.example.test;import android.app.Activity;import android.os.Bundle;import android.view.Menu;public class MainActivity extends Activity {? ? @Override? ? protected void onCreate(Bundle savedInstanceState) {? ? ? ? super.onCreate(savedInstanceState);? ? ? ? setContentView(R.layout.activity_main);? ? }? ? public boolean OnCreateOptionsMenu(Menu menu){? ? getMenuInflater().inflate(R.menu.main,menu);? ? return true;? ? }}/*這是方法的重寫*/package com.example.test;import android.content.Context;import android.util.AttributeSet;import android.widget.TextView;public class GundongText extends TextView{ public GundongText(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } public GundongText(Context context, AttributeSet attrs) { super(context, attrs); } public GundongText(Context context) { super(context); } @Override public boolean isFocused(){ return true; }}/*這是layout*/<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"? ? xmlns:tools="http://schemas.android.com/tools"? ? android:id="@+id/container"? ? android:layout_width="match_parent"? ? android:layout_height="match_parent"? ? tools:context="com.example.test.MainActivity"? ? tools:ignore="MergeRootFrame" >? ? <com.exaple.test.GundongText? ? ? ? android:id="@+id/textView1"? ? ? ? android:layout_width="match_parent"? ? ? ? android:layout_height="wrap_content"? ? ? ? android:singleLine="true"? ? ? ? android:focusable="true"? ? ? ? android:ellipsize="marquee"? ? ? ? android:focusableInTouchMode="true"? ? ? ? android:text="@string/Text" />? ? <com.exaple.test.GundongText? ? ? ? android:layout_below="@+id/textView1"? ? ? ? android:layout_width="match_parent"? ? ? ? android:layout_height="wrap_content"? ? ? ? android:ellipsize="marquee"? ? ? ? android:layout_marginTop="23dp"? ? ? ? android:focusable="true"? ? ? ? android:focusableInTouchMode="true"? ? ? ? android:singleLine="true"? ? ? ? android:text="@string/Text" /></RelativeLayout>
查看完整描述

1 回答

?
Js_Ly

TA貢獻10條經驗 獲得超1個贊

簡單的單詞拼寫錯誤

查看完整回答
反對 回復 2016-03-29
  • 1 回答
  • 0 關注
  • 4395 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號