Diynamic class package com example linegraph; import
bet 1/2 Sana 14.01.2022 Hajmi 33,33 Kb. #361345
Bog'liq
Dinamika dastur
Платформа: Android қурилмалари (версияси 4.2 дан юқори бўлганлари учун)
Diynamic class
package com.example.linegraph;
import android.graphics.Color;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.jjoe64.graphview.series.DataPoint;
import com.jjoe64.graphview.series.LineGraphSeries;
public class Dinamikextends AppCompatActivity {
Button natija ;
Boolean calculated = false ;
//a uchunchiziqlar
LineGraphSeriesseries_Ua = new LineGraphSeries<>();
LineGraphSeriesseries_Ua1 = new LineGraphSeries<>();
LineGraphSeriesseries_Ua2 = new LineGraphSeries<>();
//b uchunchiziqlar
LineGraphSeriesseries_Ub = new LineGraphSeries<>();
LineGraphSeriesseries_Ub1 = new LineGraphSeries<>();
LineGraphSeriesseries_Ub2 = new LineGraphSeries<>();
//c uchunchiziqlar
LineGraphSeriesseries_Uc = new LineGraphSeries<>();
LineGraphSeriesseries_Uc1 = new LineGraphSeries<>();
LineGraphSeriesseries_Uc2 = new LineGraphSeries<>();
//Qiymatlar
double e = 2.71;
double pi = 3.14;
double F = 0.02 * 0.02;
double l_m = 0.1;
double myu = 125 * Math.pow (10, -4);
double myu_0 = 125 * Math.pow (10, -6);
double sigma = 0.01;
double R_myu = l_m / (myu * F );
double R_sigma = sigma / (myu_0 * F );
@Override
protected void onCreate(Bundle savedInstanceState) {
super .onCreate(savedInstanceState);
setContentView(R.layout.activity_dinamik );
natija = findViewById(R.id.result );
com.jjoe64.graphview.GraphView graphView1 = findViewById(R.id.graph_dinamic );
graphView1.setTitle("Dynamic graph" );
graphView1.setTitleColor(Color.RED );
// graphView1.getViewport().setXAxisBoundsManual(true);
// graphView1.getViewport().setMinX(0);
// graphView1.getViewport().setMaxX(0.08);
// graphView1.getViewport().setYAxisBoundsManual(true);
// graphView1.getViewport().setMinY(-2.);
// graphView1.getViewport().setMaxY(4);
graphView1.getViewport().setScrollable(true );
graphView1.getViewport().setScrollableY(true );
graphView1.getViewport().setScalable(true );
graphView1.getViewport().setScalableY(true );
graphView1.setTitleTextSize(50);
//Edittextlarnitopamiz
EditText Wk1 = findViewById(R.id.Wk1 );
EditText Wk2 = findViewById(R.id.Wk2 );
EditText Wk3 = findViewById(R.id.Wk3 );
EditText Wch1 = findViewById(R.id.Wch1 );
EditText Wch2 = findViewById(R.id.Wch2 );
EditText Wch3 = findViewById(R.id.Wch3 );
EditText f = findViewById(R.id.f );
EditText T = findViewById(R.id.T );
String f1 = f.getText().toString();
String T1 = T.getText().toString();
String wk_1 = Wk1.getText().toString();
String wch_1 = Wch1.getText().toString();
String wk_2 = Wk2.getText().toString();
Do'stlaringiz bilan baham: