小编use*_*583的帖子

我不能使用findViewById

为什么我不能findViewById在这个文件中使用?

Regfragment:

import android.support.v4.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;


public class RegFragment extends Fragment {

EditText text1,text2,text3;
Button btn1;

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {

    View rootView = inflater.inflate(R.layout.reg_layout, container, false);

    return rootView;


}
}
Run Code Online (Sandbox Code Playgroud)

然后我试着这样做:

import android.support.v4.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;


public class RegFragment extends Fragment {

EditText text1,text2,text3;
Button btn1;

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, …
Run Code Online (Sandbox Code Playgroud)

android android-fragments

6
推荐指数
1
解决办法
8505
查看次数

为什么这个二分算法无法终止?

这是我的上市:

procedure TForm1.Button1Click(Sender: TObject);
var
  i: Integer;
  x1, x2, x3, xl, xr, xm, hasil, hasil2: Real;
begin
  xl := StrToFloat(Edit1.Text);
  xr := StrToFloat(Edit2.Text);
  x1 := F1(xl);
  x2 := F1(xr);
  hasil := x1 * x2;
  if hasil > 0 then
  begin
    ShowMessage('Try Again....!!!');
    Edit1.Clear;
    Edit2.Clear;
  end
  else
  begin
    i := 1;
    repeat
      xm := (xl + xr) / 2;
      x3 := F1(xm);
      hasil2 := x1 * x3;
      if hasil2 < 0 then
      begin
        xr := xm;
        x2 := x3;
      end
      else …
Run Code Online (Sandbox Code Playgroud)

delphi pascal delphi-2010

2
推荐指数
1
解决办法
255
查看次数

如何在bash脚本中使用for循环复制和重命名文件?

如何使用For循环将所有文件*.html复制到*.php?

帮我...

我的脚本:

#!/bin/bash
list="$(ls *.html)"
for i in "$list"
do
  newname=$(ls "$i" | sed -e 's/html/php/')
  cat beginfile > "$newname"
  cat "$i" | sed -e '1,26d' | tac | sed -e '1,21d' | tac >> "$newname"
  cat endfiel >> "$newname"
done
Run Code Online (Sandbox Code Playgroud)

或者你有另一个想法?

linux bash shell loops

2
推荐指数
1
解决办法
7409
查看次数

标签 统计

android ×1

android-fragments ×1

bash ×1

delphi ×1

delphi-2010 ×1

linux ×1

loops ×1

pascal ×1

shell ×1