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 Galaxy Mini (S5570)































Brand Samsung
Model (codename) Galaxy Mini (S5570)
Price (cena, včetně DPH) 3500 / 06.2012
Display size in Inch (v palcích) 3.14
Display-resolution 240x320
Dotek-typ kapacitní
CPU typ MSM7227
CPU MHz 600
CPU core
L2 cache yes
RAM 256
ROM 512
GPU Adreno 200
NenaMark2 Benchmark
GPU-GLBenchmark
Baterie mAh 1200
Foto MPx 3
Autofocus no
Video QVGA (320 x 240) při 15 frames/s
Official Android ICS Android Froyo 2.2
CyanogenMod support yes
Dotek-prstů-max Dual-touch (two fingers)
Display-ppi 127
Display-retina 39%
Networks GSM&EDGE (850 / 900 / 1.800 / 1.900 MHz) 3G (900 / 2.100 MHz)
Connectivity Bluetooth V2.1 , USB V2.0 , USB mass storage , SyncML(DM) , WIFI , AGPS, 3.5 mm jack
Note


Samsung S5570 Galaxy Mini - image
samsung-s5570-galaxy-mini

397LW NO topic_id



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


226

Eclipse my templates store Android | eclipse-my-templates-store-android


Where file(s) does eclipse store Java code style settings to?
If you need copy any old templates to the new workspace.

workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.jdt.ui.prefs


You can edit the Eclipse Templates from menu Window - Preferences - Java - Editor - Templates.
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>






53

Timer stopwatch based on Java Calendar class Android example | timer-stopwatch-java-calendar-android-example


Start Stop Stopwatch Timer Android example source code.


private static long mStartTime = 0L;
Calendar cal;
TextView hTextViewVypis = (TextView)findViewById(R.id.idTextVypis);

void start(){
            cal = Calendar.getInstance();
            mStartTime = cal.getTimeInMillis();
}

void stop(){
     prinOutStopWatchTime();
}


    private void prinOutStopWatchTime() {
    	final long start = mStartTime;
    	
    	cal = Calendar.getInstance();
    	long stopTime = cal.getTimeInMillis();
    	long millis = stopTime - start;
    	long milisekundy = millis % 1000;
    	int seconds = (int) (millis / 1000);
    	int minutes = seconds / 60;
    	seconds     = seconds % 60;
    	int hour = minutes / 60;
    	hour = hour % 60;
    	
    	if (seconds < 10) {
    		hTextViewVypis.setText(hour +  ":" + minutes + ":0" + seconds + ":" + milisekundy);
    	} else {
    		hTextViewVypis.setText(hour  +  ":" + minutes + ":" + seconds + ":" + milisekundy);            
    	}
    	
    }




369

View getId is null Android | view-getid-is-null-android


If you create a button or view programmatically with OnClickListener you can set a tag key before button in parent layout is added.
And get correct button by this tag getTag() instead getId() in OnClickListener etc.

Button button = new Button(getApplicationContext());
int idOfButton = button.getId(); // return -1

button.setTag("my_button");
String sTag = (String) button.getTag(); // return "my_button"

315

Difference between logical operators and or Java | difference-between-logical-operators-and-or-java


Basic difference remember it!!!
if(TRUE && TRUE && TRUE) return TRUE otherwise FALSE

if(FALSE || FALSE || FALSE) return FALSE otherwise TRUE

Logical operator and &&
If all conditions/operands is TRUE return TRUE, otherwise return FALSE

if( true and true and true){ 
  // return true - do something
}
int a = 6;
if(a == 6 && a == 6 ) {
 // if TRUE
 // true && true return true, do something
}

if(a == 6 && a == 5){
  // nothing, not attended
}else{
  // true && false return false, or false && false return false 
  // do something
}


Logical operator or ||
The logical OR operator (||) returns the boolean value true if either or both operands is true and returns false otherwise.
If one operands is TRUE, condition is TRUE:

if(FALSE OR FALSE OR TRUE) return TRUE
if(FALSE OR TRUE OR FALSE) return TRUE
if(FALSE OR FALSE OR FALSE) return FALSE

int a = 6;
if(a==6 || a==5){ // TRUE || FALSE return TRUE
  //if return TRUE
  //one from operadns is TRUE return true,  do something
}

if(a==5 || a==4){ // FALSE || FALSE return FALSE
 // not attended
}else{
 //if return FALSE, do something
}

rev


Editace Jana Žákovská : 2012-06-10 10:25:24
Počet článků v kategorii: 397
Url:samsung-galaxy-mini-s5570
Share
Share
Tweet