Sublime Text 利用するプラグイン
1. PackageControl 追加
https://packagecontrol.io/installation#Simple
2. 日本語サポートする IMESupport
3. SFTP FTPサーバーと接続するため
4. F5 を押すと日付を入力する insertDate
SublimeAStyleFormatter
is a simple code formatter plugin for Sublime Text 2.
It provides ability to format C, C++, C#, and Java files.
2016年10月30日日曜日
Android應用開發視頻教程
黑马程序员 毕向东 Java基础视频教程
https://www.youtube.com/playlist?list=PLvswSo32Xlu_ctuWa-7-huGYUlsslzVhi
Android應用開發視頻教程
https://www.youtube.com/playlist?list=PLvswSo32Xlu8EVeS2RZvTg30M78WLROkT
https://www.youtube.com/playlist?list=PLvswSo32Xlu_ctuWa-7-huGYUlsslzVhi
Android應用開發視頻教程
https://www.youtube.com/playlist?list=PLvswSo32Xlu8EVeS2RZvTg30M78WLROkT
2016年10月27日木曜日
Grid View 自定义布局
Grid View 自定义布局
1. 选择 Grid View 的布局位置
2. 自定义Adapter
3. 设置数据
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
GridView gv = (GridView) findViewById(R.id.gv);
gv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
TextView tv = (TextView) view.findViewById(R.id.grid_textview);
String s = tv.getText().toString();
Toast.makeText(MainActivity.this, s, Toast.LENGTH_SHORT).show();
}
});
imgAdapter imgadapter = new imgAdapter();
gv.setAdapter(imgadapter);
}
class imgAdapter extends BaseAdapter {
public int getCount() {
return mThumbIds.length;
}
public Object getItem(int position) {
return null;
}
public long getItemId(int position) {
return 0;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View v = LayoutInflater.from(getApplication()).inflate(R.layout.gridview, null);
ImageView iv = (ImageView) v.findViewById(R.id.grid_img);
TextView tv = (TextView) v.findViewById(R.id.grid_textview);
iv.setImageResource(mThumbIds[position]);
tv.setText(getString(mThumbIds[position]));
return v;
}
private Integer[] mThumbIds = {
R.drawable.sample_2, R.drawable.sample_3,
R.drawable.sample_4, R.drawable.sample_5,
R.drawable.sample_6, R.drawable.sample_7,
R.drawable.sample_0, R.drawable.sample_1,
R.drawable.sample_2, R.drawable.sample_3,
R.drawable.sample_4, R.drawable.sample_5,
R.drawable.sample_6, R.drawable.sample_7,
R.drawable.sample_0, R.drawable.sample_1,
R.drawable.sample_2, R.drawable.sample_3,
R.drawable.sample_4, R.drawable.sample_5,
R.drawable.sample_6, R.drawable.sample_7
};
}
}
Activity 布局
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
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="com.example.e560.m1026gridview.MainActivity">
<GridView
android:id="@+id/gv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:columnWidth="90dp"
android:numColumns="auto_fit"
android:verticalSpacing="10dp"
android:horizontalSpacing="10dp"
android:stretchMode="columnWidth"
android:gravity="center"
/>
</RelativeLayout>
自定义布局
<?xml version="1.0" encoding="utf-8"?>
<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="match_parent">
<ImageView
android:id="@+id/grid_img"
android:layout_width="400dp"
android:layout_height="140dp"
android:background="#CCCCCC" />
<TextView
android:id="@+id/grid_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFCCCC"
android:textSize="20dp" />
</RelativeLayout>
1. 选择 Grid View 的布局位置
2. 自定义Adapter
3. 设置数据
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
GridView gv = (GridView) findViewById(R.id.gv);
gv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
TextView tv = (TextView) view.findViewById(R.id.grid_textview);
String s = tv.getText().toString();
Toast.makeText(MainActivity.this, s, Toast.LENGTH_SHORT).show();
}
});
imgAdapter imgadapter = new imgAdapter();
gv.setAdapter(imgadapter);
}
class imgAdapter extends BaseAdapter {
public int getCount() {
return mThumbIds.length;
}
public Object getItem(int position) {
return null;
}
public long getItemId(int position) {
return 0;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View v = LayoutInflater.from(getApplication()).inflate(R.layout.gridview, null);
ImageView iv = (ImageView) v.findViewById(R.id.grid_img);
TextView tv = (TextView) v.findViewById(R.id.grid_textview);
iv.setImageResource(mThumbIds[position]);
tv.setText(getString(mThumbIds[position]));
return v;
}
private Integer[] mThumbIds = {
R.drawable.sample_2, R.drawable.sample_3,
R.drawable.sample_4, R.drawable.sample_5,
R.drawable.sample_6, R.drawable.sample_7,
R.drawable.sample_0, R.drawable.sample_1,
R.drawable.sample_2, R.drawable.sample_3,
R.drawable.sample_4, R.drawable.sample_5,
R.drawable.sample_6, R.drawable.sample_7,
R.drawable.sample_0, R.drawable.sample_1,
R.drawable.sample_2, R.drawable.sample_3,
R.drawable.sample_4, R.drawable.sample_5,
R.drawable.sample_6, R.drawable.sample_7
};
}
}
Activity 布局
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
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="com.example.e560.m1026gridview.MainActivity">
<GridView
android:id="@+id/gv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:columnWidth="90dp"
android:numColumns="auto_fit"
android:verticalSpacing="10dp"
android:horizontalSpacing="10dp"
android:stretchMode="columnWidth"
android:gravity="center"
/>
</RelativeLayout>
自定义布局
<?xml version="1.0" encoding="utf-8"?>
<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="match_parent">
<ImageView
android:id="@+id/grid_img"
android:layout_width="400dp"
android:layout_height="140dp"
android:background="#CCCCCC" />
<TextView
android:id="@+id/grid_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFCCCC"
android:textSize="20dp" />
</RelativeLayout>
2016年10月24日月曜日
Android 生命周期
Android 生命周期
第一次启动
MainActivity: --1--onCreate
MainActivity: --2--onStart
MainActivity: --3--onResume
跳到其他Activity
MainActivity: --4--onPause
MainActivity: --9--onSaveInstanceState
MainActivity: --5--onStop
返回键返回
MainActivity: --6--onRestart
MainActivity: --2--onStart
MainActivity: --3--onResume
接电话
MainActivity: --4--onPause
MainActivity: --9--onSaveInstanceState 有延迟
挂电话
MainActivity: --3--onResume
按返回键推出到Android界面
MainActivity: --4--onPause
MainActivity: --5--onStop
MainActivity: --7--onDestroy
重新启动
MainActivity: --1--onCreate
MainActivity: --2--onStart
MainActivity: --3--onResume
旋转屏幕
MainActivity: --4--onPause
MainActivity: --9--onSaveInstanceState
MainActivity: --5--onStop
MainActivity: --7--onDestroy
MainActivity: --1--onCreate
MainActivity: --2--onStart
MainActivity: --8--onRestoreInstanceState
MainActivity: --3--onResume
按Home键
MainActivity: --4--onPause
MainActivity: --9--onSaveInstanceState
MainActivity: --5--onStop
按APP图标开启
MainActivity: --6--onRestart
MainActivity: --2--onStart
MainActivity: --3--onResume
按Power键,关屏幕
MainActivity: --4--onPause
MainActivity: --9--onSaveInstanceState
MainActivity: --5--onStop
按Power键,开屏幕
MainActivity: --6--onRestart
MainActivity: --2--onStart
MainActivity: --3--onResume
按方块键
MainActivity: --4--onPause
MainActivity: --9--onSaveInstanceState
MainActivity: --5--onStop
按方块键,重新回到App
MainActivity: --6--onRestart
MainActivity: --2--onStart
MainActivity: --3--onResume
public class MainActivity extends AppCompatActivity {
private final String TAG = "MainActivity";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Log.i(TAG, "--1--onCreate");
Button bt = (Button) findViewById(R.id.button);
bt.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this, NewActivity.class);
startActivity(intent);
}
});
}
@Override
protected void onStart() {
super.onStart();
Log.i(TAG, "--2--onStart");
}
@Override
protected void onResume() {
super.onResume();
Log.i(TAG, "--3--onResume");
}
@Override
protected void onPause() {
super.onPause();
Log.i(TAG, "--4--onPause");
}
@Override
protected void onStop() {
super.onStop();
Log.i(TAG, "--5--onStop");
}
@Override
protected void onRestart() {
super.onRestart();
Log.i(TAG, "--6--onRestart");
}
@Override
protected void onDestroy() {
super.onDestroy();
Log.i(TAG, "--7--onDestroy");
}
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
Log.i(TAG, "--8--onRestoreInstanceState");
}
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
Log.i(TAG,"--9--onSaveInstanceState");
}
}
第一次启动
MainActivity: --1--onCreate
MainActivity: --2--onStart
MainActivity: --3--onResume
跳到其他Activity
MainActivity: --4--onPause
MainActivity: --9--onSaveInstanceState
MainActivity: --5--onStop
返回键返回
MainActivity: --6--onRestart
MainActivity: --2--onStart
MainActivity: --3--onResume
接电话
MainActivity: --4--onPause
MainActivity: --9--onSaveInstanceState 有延迟
挂电话
MainActivity: --3--onResume
按返回键推出到Android界面
MainActivity: --4--onPause
MainActivity: --5--onStop
MainActivity: --7--onDestroy
重新启动
MainActivity: --1--onCreate
MainActivity: --2--onStart
MainActivity: --3--onResume
旋转屏幕
MainActivity: --4--onPause
MainActivity: --9--onSaveInstanceState
MainActivity: --5--onStop
MainActivity: --7--onDestroy
MainActivity: --1--onCreate
MainActivity: --2--onStart
MainActivity: --8--onRestoreInstanceState
MainActivity: --3--onResume
按Home键
MainActivity: --4--onPause
MainActivity: --9--onSaveInstanceState
MainActivity: --5--onStop
按APP图标开启
MainActivity: --6--onRestart
MainActivity: --2--onStart
MainActivity: --3--onResume
按Power键,关屏幕
MainActivity: --4--onPause
MainActivity: --9--onSaveInstanceState
MainActivity: --5--onStop
按Power键,开屏幕
MainActivity: --6--onRestart
MainActivity: --2--onStart
MainActivity: --3--onResume
按方块键
MainActivity: --4--onPause
MainActivity: --9--onSaveInstanceState
MainActivity: --5--onStop
按方块键,重新回到App
MainActivity: --6--onRestart
MainActivity: --2--onStart
MainActivity: --3--onResume
public class MainActivity extends AppCompatActivity {
private final String TAG = "MainActivity";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Log.i(TAG, "--1--onCreate");
Button bt = (Button) findViewById(R.id.button);
bt.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this, NewActivity.class);
startActivity(intent);
}
});
}
@Override
protected void onStart() {
super.onStart();
Log.i(TAG, "--2--onStart");
}
@Override
protected void onResume() {
super.onResume();
Log.i(TAG, "--3--onResume");
}
@Override
protected void onPause() {
super.onPause();
Log.i(TAG, "--4--onPause");
}
@Override
protected void onStop() {
super.onStop();
Log.i(TAG, "--5--onStop");
}
@Override
protected void onRestart() {
super.onRestart();
Log.i(TAG, "--6--onRestart");
}
@Override
protected void onDestroy() {
super.onDestroy();
Log.i(TAG, "--7--onDestroy");
}
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
Log.i(TAG, "--8--onRestoreInstanceState");
}
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
Log.i(TAG,"--9--onSaveInstanceState");
}
}
2016年10月22日土曜日
ListFragment 和自定义布局Layout
ListFragment 和自定义布局Layout
public class ListFrag extends ListFragment {
public myadaputer adapter;
public List<String> data;
public void setData(List<String> data) {
this.data = data;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
adapter = new myadaputer();
adapter.setDate(getdata());
}
public List<String> getdata(){
Bundle ig = getArguments();
int size = ig.getInt("size");
List<String> x = new ArrayList<String>();
for(int i=0;i< size ;i++) {
x.add("add" + i);
}
return x;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.listfrag_layout, null);
setListAdapter(adapter);
return view;
}
@Override
public void onPause() {
super.onPause();
}
@Override
public void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
Toast.makeText(getActivity(), "onListItemClick", Toast.LENGTH_SHORT).show();
}
class myadaputer extends BaseAdapter {
private List<String> data;
public void setDate(List<String> data) {
this.data = data;
}
@Override
public int getCount() {
return data.size();
}
@Override
public Object getItem(int position) {
return data.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View view = null;
if(convertView == null){
view = LayoutInflater.from(getActivity()).inflate(R.layout.listview,null);
}else{
view = convertView;
}
TextView tv = (TextView) view.findViewById(R.id.textView);
tv.setText(data.get(position).toString());
return view;
}
}
}
public class ListFrag extends ListFragment {
public myadaputer adapter;
public List<String> data;
public void setData(List<String> data) {
this.data = data;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
adapter = new myadaputer();
adapter.setDate(getdata());
}
public List<String> getdata(){
Bundle ig = getArguments();
int size = ig.getInt("size");
List<String> x = new ArrayList<String>();
for(int i=0;i< size ;i++) {
x.add("add" + i);
}
return x;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.listfrag_layout, null);
setListAdapter(adapter);
return view;
}
@Override
public void onPause() {
super.onPause();
}
@Override
public void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
Toast.makeText(getActivity(), "onListItemClick", Toast.LENGTH_SHORT).show();
}
class myadaputer extends BaseAdapter {
private List<String> data;
public void setDate(List<String> data) {
this.data = data;
}
@Override
public int getCount() {
return data.size();
}
@Override
public Object getItem(int position) {
return data.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View view = null;
if(convertView == null){
view = LayoutInflater.from(getActivity()).inflate(R.layout.listview,null);
}else{
view = convertView;
}
TextView tv = (TextView) view.findViewById(R.id.textView);
tv.setText(data.get(position).toString());
return view;
}
}
}
2016年10月21日金曜日
Java 回调
Java 回调
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
for(int i=0; i < 10; i++){
System.out.print(i);
}
////////////////////////////////////
new Thread(new Runnable(){
public void run(){
Test t = new Test();
t.relist(new Test.CallBack(){
public void getdata(List<String> list){
System.out.println(list);
}
});
}
}).start();
///////////////////////////////////
///////////////////////////////////
// Test t = new Test();
// t.relist(new Test.CallBack(){
// public void getdata(List<String> list){
// System.out.println(list);
// }
// });
///////////////////////////////////
for(int i=0; i < 10; i++){
System.out.print(i);
}
}
}
class Test{
private List<String> ls;
public interface CallBack{
public void getdata(List<String> list);
}
public void relist(CallBack calback){
ls = new ArrayList<String>();
for(int i = 0; i< 10; i++){
ls.add("add" + i);
}
calback.getdata(ls);
}
}
https://paiza.io/projects/HaU5z4cE88fPD8xvSeUznA
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
for(int i=0; i < 10; i++){
System.out.print(i);
}
////////////////////////////////////
new Thread(new Runnable(){
public void run(){
Test t = new Test();
t.relist(new Test.CallBack(){
public void getdata(List<String> list){
System.out.println(list);
}
});
}
}).start();
///////////////////////////////////
///////////////////////////////////
// Test t = new Test();
// t.relist(new Test.CallBack(){
// public void getdata(List<String> list){
// System.out.println(list);
// }
// });
///////////////////////////////////
for(int i=0; i < 10; i++){
System.out.print(i);
}
}
}
class Test{
private List<String> ls;
public interface CallBack{
public void getdata(List<String> list);
}
public void relist(CallBack calback){
ls = new ArrayList<String>();
for(int i = 0; i< 10; i++){
ls.add("add" + i);
}
calback.getdata(ls);
}
}
https://paiza.io/projects/HaU5z4cE88fPD8xvSeUznA
2016年10月20日木曜日
在MainActivity内调用Fragment内的控件并实现方法
在MainActivity内调用Fragment内的控件,
并在MainActivity内实现Fragment内的控件的方法
MainActivety.java
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
private FragmentManager fragmentManager;
private FragmentTransaction fragmentTransaction;
private xxx x;
private vvv v;
private EditText xet ,vet;
private Button xbt, vbt;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
fragmentManager = getFragmentManager();
fragmentTransaction = fragmentManager.beginTransaction();
x = new xxx();
v = new vvv();
fragmentTransaction.add(R.id.vvv, v, "fv");
fragmentTransaction.add(R.id.xxx, x, "fx");
fragmentTransaction.commit();
}
@Override
protected void onStart() {
super.onStart();
xbt = (Button) x.getView().findViewById(R.id.xxxbutton);
vbt = (Button) v.getView().findViewById(R.id.vvvbutton);
xbt.setOnClickListener(this);
vbt.setOnClickListener(this);
}
@Override
public void onClick(View view) {
vet = (EditText) v.getView().findViewById(R.id.vvveditText);
xet = (EditText) x.getView().findViewById(R.id.xxxeditText);
switch(view.getId()){
case R.id.vvvbutton:
if(vet != null) {
vet.setText(xet.getText().toString());
System.out.println(vet);
}
break;
case R.id.xxxbutton:
if(xet != null) {
xet.setText(vet.getText().toString());
System.out.println(xet);
}
break;
default:
break;
}
}
}
并在MainActivity内实现Fragment内的控件的方法
MainActivety.java
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
private FragmentManager fragmentManager;
private FragmentTransaction fragmentTransaction;
private xxx x;
private vvv v;
private EditText xet ,vet;
private Button xbt, vbt;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
fragmentManager = getFragmentManager();
fragmentTransaction = fragmentManager.beginTransaction();
x = new xxx();
v = new vvv();
fragmentTransaction.add(R.id.vvv, v, "fv");
fragmentTransaction.add(R.id.xxx, x, "fx");
fragmentTransaction.commit();
}
@Override
protected void onStart() {
super.onStart();
xbt = (Button) x.getView().findViewById(R.id.xxxbutton);
vbt = (Button) v.getView().findViewById(R.id.vvvbutton);
xbt.setOnClickListener(this);
vbt.setOnClickListener(this);
}
@Override
public void onClick(View view) {
vet = (EditText) v.getView().findViewById(R.id.vvveditText);
xet = (EditText) x.getView().findViewById(R.id.xxxeditText);
switch(view.getId()){
case R.id.vvvbutton:
if(vet != null) {
vet.setText(xet.getText().toString());
System.out.println(vet);
}
break;
case R.id.xxxbutton:
if(xet != null) {
xet.setText(vet.getText().toString());
System.out.println(xet);
}
break;
default:
break;
}
}
}
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
tools:context="com.example.java.m1020a.MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:id="@+id/xxx"
android:orientation="vertical"
></LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:id="@+id/vvv"
android:orientation="vertical"
></LinearLayout>
</LinearLayout>
vvv.java
xxx.java
public class vvv extends Fragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fvvv, null);
return v;
}
@Override
public void onPause() {
super.onPause();
}
}
fvvv.xml
fxxx.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text="fv"
android:ems="10"
android:id="@+id/vvveditText" />
<Button
android:text="fvvv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/vvvbutton" />
</LinearLayout>
登録:
投稿 (Atom)