Wij werken momenteel aan een nieuw forum voor Androidworld. Het is daarom momenteel niet mogelijk om te reageren of nieuwe topics aan te maken.
Zatta;361731
Voor die scrollview kiest je eens bij de properties kijken of in je XML bijtypen:android:fadeScrollbars="false"
francois43;362008
Hoi,
MAAR DE VERTICALE SCROLLBAR IS ER NOG STEEDS NIET=
groet
Hallo iedereen, ik heb ook maar weer wat geprobeerd(ben een totale leek), maar als ik op Bereken klik, gebeurt er niks
package my.way.scrollviewdemo; import android.os.Bundle; import android.app.Activity; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.view.View; public class MainActivity extends Activity { Button mBtnCalculate; EditText mEtxtNumber; TextView mTxtvResult; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.scrollviewlayout); mBtnCalculate = (Button) findViewById(R.id.btnCalculate); mEtxtNumber = (EditText) findViewById(R.id.etxtNumber); mTxtvResult = (TextView) findViewById(R.id.txtvResult); } public void calculateTables(View view){ if (view == mBtnCalculate){ String allCalculationsResult = ""; String numberString = mEtxtNumber.getText().toString(); int number = Integer.parseInt(numberString); for (int counter = 0; counter < 60; counter++){ int result; result = counter * number; String calculationResult; calculationResult = counter + " x " + number + " = " + result; allCalculationsResult = allCalculationsResult + "\n" + calculationResult; } mTxtvResult.setText(allCalculationsResult); } } }
<?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="10dp" > <EditText android:id="@+id/etxtNumber" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_toRightOf="@+id/btnCalculate" android:ems="10" android:hint="Voer een getal in" android:inputType="numberDecimal" > <requestFocus /> </EditText> <TextView android:id="@+id/txtvResult" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/btnCalculate" android:layout_marginTop="10dp" android:text="\n" android:textColor="#FFFFFF" android:textSize="14dp" /> <Button android:id="@+id/btnCalculate" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="calculateTables" android:text="Bereken!" /> </RelativeLayout> </ScrollView>
Met de groetjes uit Dokkum!
Xiaomi M2S - ParanoidAndroid
Archos 101 G9 - CM10.2
Hallo,
Tot nu toe is me alles gelukt, behalve het weghalen van de titel bar.
Erg mooie tutorial alweer.
Het is we ondertussen ook weer gelukt om de titel balk weg te krijgen
Wel op een andere manier!
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_NO_TITLE); //DEZE HEB IK GEBRUIKT OM TITELBALK TE VERWIJDEREN setContentView(R.layout.nicelayout); mBtnCalculate = (Button) findViewById(R.id.btnCalculate); mEtxtNumber = (EditText) findViewById(R.id.etxtNumber); mTxtvResult = (TextView) findViewById(R.id.txtvResult); }
Telefoons:
- OnePlus One
- OnePlus Two
Alle sources van de tutorials staan op Wouters github: https://github.com/woutervegter
Voor die scrollview kiest je eens bij de properties kijken of in je XML bijtypen: