最終更新: llysfactoryll 2013年06月18日(火) 22:42:19履歴
<<平均をリセット
アクティビティのレイアウトを、たて向きの、リニアに変更しています。
エディットテキストのセンタリングは、「android:textAlignment="center"」では出来ず、「android:gravity="center_vertical|center_horizontal"」で行うようです。
エディットテキストは、入力や、クリックを受け付けたくありません。しかし、「android:focusable="false"」にしてしまうと見にくくなるので、クリックには反応しますが、我慢することにします。
最後に、メニューは必要ないので、「onCreateOptionsMenu」をコメントにしています。
<<終わり>>
アクティビティのレイアウトを、たて向きの、リニアに変更しています。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/LinearLayout" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".MainActivity" >
エディットテキストのセンタリングは、「android:textAlignment="center"」では出来ず、「android:gravity="center_vertical|center_horizontal"」で行うようです。
エディットテキストは、入力や、クリックを受け付けたくありません。しかし、「android:focusable="false"」にしてしまうと見にくくなるので、クリックには反応しますが、我慢することにします。
<EditText android:id="@+id/editText_tempoAverage" android:layout_width="match_parent" android:layout_height="wrap_content" android:clickable="false" android:ems="10" android:focusable="false" android:focusableInTouchMode="false" android:gravity="center_vertical|center_horizontal" android:hint="平均" /> </LinearLayout>
最後に、メニューは必要ないので、「onCreateOptionsMenu」をコメントにしています。
public class MainActivity extends Activity { // @Override // public boolean onCreateOptionsMenu(Menu menu) { // // Inflate the menu; this adds items to the action bar if it is present. // getMenuInflater().inflate(R.menu.main, menu); // return true; // } }
<<終わり>>
コメントをかく