Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<pre><code>public class MainActivity extends Activity { private GaugeView mGaugeView1; private GaugeView mGaugeView2; private final Random RAND = new Random(); @Override public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mGaugeView1 = (GaugeView) findViewById(R.id.gauge_view1); mGaugeView2 = (GaugeView) findViewById(R.id.gauge_view2); mTimer.start(); } private final CountDownTimer mTimer = new CountDownTimer(30000, 1000) { @Override public void onTick(final long millisUntilFinished) { mGaugeView1.setTargetValue(RAND.nextInt(101)); mGaugeView2.setTargetValue(RAND.nextInt(101)); } @Override public void onFinish() {} }; } </code></pre> <p><b>Edit</b></p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:gauge="http://schemas.android.com/apk/res/org.codeandmagic.android.gauge.samples" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:gravity="center" android:background="@drawable/background" android:padding="20dp" &gt; &lt;org.codeandmagic.android.gauge.GaugeView android:id="@+id/gauge_view1" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" /&gt; &lt;org.codeandmagic.android.gauge.GaugeView android:id="@+id/gauge_view2" android:layout_width="150dp" android:layout_height="150dp" android:layout_marginTop="10dp" gauge:showOuterShadow="true" gauge:showOuterRim="false" gauge:showNeedle="false" gauge:showRanges="false" gauge:showText="true" gauge:textUnit="%" /&gt; &lt;/LinearLayout&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload