私はアンドロイドプログラム開発の初心者です...しかし、私はアンドロイド携帯電話でオシロスコープを開発するタスクを与えられました。私はプログラムをデバッグするときにいくつかのプログラムがあります。 私は..Androidオシロスコープを開発する
run_buton = (ToggleButton) findViewById(R.id.tbtn_runtoggle);
run_buton.setOnClickListener(this);
rb1 = (RadioButton)findViewById(R.id.rbtn_ch1);
rb2 = (RadioButton)findViewById(R.id.rbtn_ch2);
と
public static final int rbtn_ch1 = 0;
public static final int rbtn_ch2 = 0;
public static final int txt_ch1pos = 0;
public static final int txt_ch2pos = 0;
public static final int button_connect = 0;
public static final int WaveformArea = 0;
public static int btn_position_down;
public static int tbtn_runtoggle;
public static int btn_position_up;
btn_pos_up = (Button) findViewById(R.id.btn_position_up);
btn_pos_down = (Button) findViewById(R.id.btn_position_down);
btn_pos_up.setOnClickListener(this);
btn_pos_down.setOnClickListener(this);
をこれらのコードを使用して、オシロスコープのためのボタンを設定していると私はR.id.後にすべてのものを設定します整数/フィールドであることを...
以下のようにRファイルに示されている しかしEclispeは「btn_postion_up」「btn_posiion_down」、「tbtn_runtoggle」であること...私は最後の3つのフィールド上のプログラムを持っていることを教えてくれましたし、 ... それは私はそれが何を意味するのか理解しない...「case式は定数式でなければなりません」と言って、エラーを示しています...スクリプトの最初の文はエラーを取得します...
case R.id.btn_position_up :
if(rb1.isChecked() && (ch1_pos<38)){
ch1_pos += 1; ch1pos_label.setPadding(0, toScreenPos(ch1_pos), 0, 0);
sendMessage(new String(new byte[] {ADJ_POSITION, CHANNEL1, ch1_pos}));
}
else if(rb2.isChecked() && (ch2_pos<38)){
ch2_pos += 1; ch2pos_label.setPadding(0, toScreenPos(ch2_pos), 0, 0);
sendMessage(new String(new byte[] {ADJ_POSITION, CHANNEL2, ch2_pos}));
}
break;
月誰親切に私に何が起こるか教えてくれますか?
こんにちは、私はオシロスコープで録音するためのアプリを開発しています。オシロスコープの入手方法はわかりません。いくつかのサンプルコードを提供してください。ありがとう。 –