Okhelp.cz

Recepty, články, nápady, programování. Dříve dum-zahrada, finance, internet a know-how.okhelp.cz Pro lepší výsledky hledání používejte i diakritiku.

SAMSUNG i9220 Galaxy Note


AD MOB

Displej 1280 x 800, 5.3 "
Rozměry 146.85 mm x 83 mm x 9.7 mm
Rozlišení fotoaparátu 8 Mpix
HD video, natačení videosekvencí
Operační system Android
Hlasové ovládání
Přehrávání MP3
Baterie Li-Ion ,doba hovoru 1570 min
Frekvence procesoru 1.4 GHz
Uživatelská paměť 16000 MB
Datové funkce: GPS modul, WiFi, Bluetooth, GPRS, EDGE, HSCSD, Hardwarový modem, Infraport
Podporované sítě GSM&EDGE 850 / 900 / 1.800 / 1.900
Formát videosouborů 3GPP / H.263 / H.264 / MPEG4 / WMV

samsung-i9220-galaxy-note

397LW NO topic_id




AD

Další témata ....(Topics)


57

Change TableRow background color if on row click Android example | change-tablerow-background-color-if-on-row-click-android-example


Change table row background color if user click on row Android example code.
MainActivity.java

public class MainActivity extends Activity {
Boolean bColorYellow = true;
TextView hTextView;
TableRow hTableRow;
@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        hTextView = (TextView)findViewById(R.id.idTextView);
        hTableRow = (TableRow)findViewById(R.id.idTableRow1);


        
        
    } // end onCreate
  
    
    public void myTableRowClickHandler(View view) {
		switch (view.getId()) {
		case R.id.idTableRow1:{
			
			if(bColorYellow){
			hTableRow.setBackgroundColor(Color.GREEN);
			bColorYellow = false;
			}
			else{
			hTableRow.setBackgroundColor(Color.YELLOW);
			bColorYellow = true;
			}
		}
		break;
		}
  }
}


main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="//schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >


<TableLayout android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/tableLayout1">
    <TableRow android:id="@+id/idTableRow1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:background="#5655AA"
    android:onClick="@string/myTableRowClick"
    android:focusable="true">
<TextView  
	android:id="@+id/idTextView"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="@string/hello"
    />
    
    </TableRow>
</TableLayout>
    
    
</LinearLayout>



strings.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="hello">Hello World!</string>
    <string name="app_name">TableRow</string>
    <string name="myTableRowClick">myTableRowClickHandler</string>
</resources>






5

Random number Java | random-number-java


Generate random number Android Java example source code.

		Random rand = new Random();
		int i = rand.nextInt() % 256; // range -255  +255
		System.out.print(i + "

"); // -184 i = Math.abs(rand.nextInt() % 12); // range 0 +11 System.out.print(i); // 7



// Math.random() start with 0.  e.g. 0.35981234 
int nRan = (int) (Math.random()*10); // 0 - 10

// nextDouble(), nextFloat(), nextInt(), nextLong() returns 0 - 10
import java.util.Random;´

Random r = new Random();
int nRan = r.nextInt(); // 0 - 10
double dRan = r.nextDouble() * 10; // e.g. 7.496285271597397

nextDouble – return 0 - 1
nextFloat – same as double
nextInt –  -2147483648  +2147483647
nextLong –  -922337203685775808  +9223372036854775807
nextGaussian –  0.0 aberation 1.0.
36

Titlebar title bar change text setTile Android example | titlebar-title-bar-change-text-android-example


Change the title associated with this activity. If this is a top-level activity, the title for its window will change. If it is an embedded activity, the parent can do whatever it wants with it.




 String sTitle = "My new title";
 setTitle(sTitle);



215

How to programmatically set the button style - Android | how-to-programmatically-set-the-button-style-android


How set rounded corners and own styles ActivityMy.java

Button btn.setBackgroundResource(R.drawable.back_button_answer);



\res\drawable\back_button_answer.xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="//schemas.android.com/apk/res/android" android:shape="rectangle" >
   <corners android:radius="10dip" />
   <!-- background -->
   
   <gradient
                android:startColor="#D6D7D6"
                android:centerColor="#E2E2E2"
                android:centerY="0.75"
                android:endColor="#D6D7D6"
                android:angle="270"
        />
   
   <stroke android:width="2dip" android:color="#fff"/>
</shape>
264

String Array of Array Java Example | string-array-of-array-java-example


Set, get string , array of array of strings, Java example code

	public final static String[][]_arArOfString_1 = {
		new String[] {"bla","bla","hello world!"},
		new String[] {},
		new String[] {},
		new String[] {},
		new String[] {},
		new String[] {}
	};
String sOut = _arArOfString_1[0][2]; // hello world!


Editace: 2012-06-03 11:34:40
Počet článků v kategorii: 397
Url:samsung-i9220-galaxy-note

AD
11 Share
Share
Tweet