在我的布局中我有4个edittext ..我需要在达到最大长度后跳转到下一个edittext.但是有一个问题......怎么做?..有人帮我做这个......
在我的Android应用程序中,我想通过蓝牙将字符串从一个设备发送到另一个设备.可用设备显示在列表视图中.... 我想发送配对的字符串......我无法建立设备之间的连接...任何人都可以帮助我建立连接并发送字符串...我有很多例子,但无法弄清楚文件传输需要什么东西.如果有人这样做,请帮助我.未完成的代码如下
public class MainActivity extends Activity
{
ToggleButton tb1;
Button tb2, tb3;
String tbstate1, tbstate2, tbstate3;
EditText textPhoneNo, textTo;
BluetoothAdapter myBTadapter;
ArrayAdapter<String> btArrayAdapter;
String tbstate;
ListView listDevicesFound;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tb1 = (ToggleButton) findViewById(R.id.m_m_btn);
tb2 = (Button) findViewById(R.id.sms_btn);
tb3 = (Button) findViewById(R.id.email_btn);
myBTadapter = BluetoothAdapter.getDefaultAdapter();
listDevicesFound = (ListView) findViewById(R.id.devicesfound);
btArrayAdapter = new ArrayAdapter<String>(MainActivity.this,android.R.layout.simple_list_item_1);
listDevicesFound.setAdapter(btArrayAdapter);
// listDevicesFound.setAdapter(detectedAdapter);
// listDevicesFound = new ListItemClicked();
// detectedAdapter.notifyDataSetChanged();
//
registerReceiver(ActionFoundReceiver, new IntentFilter(BluetoothDevice.ACTION_FOUND));
tb1.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View …Run Code Online (Sandbox Code Playgroud) 我从XML解析得到日期字符串,如下所示:2012-04-05 07:55:29 +05.30
现在,我希望这个字符串为:2012年4月5日
我怎样才能做到这一点?