Yangi formatda davom etish uchun: https://uzfor.net/view.php?id=63490&page=3
Android ilovalar tuzishni o'rganamiz
Mavzu fayllari (16)
Xabarlar
Bita savol boridi Android Studiodan
android sdk da 4.1.0 versiya yuklangan holos. shu versiyaga yozilgan dastur bundan yuqori versiyalarda ham ishloradimi?
android sdk da 4.1.0 versiya yuklangan holos. shu versiyaga yozilgan dastur bundan yuqori versiyalarda ham ishloradimi?
developer, # developer (01.04.2020 / 17:20)
Bita savol boridi Android Studiodan
android sdk da 4.1.0 versiya yuklangan holos. shu versiyaga yozilgan dastur bundan yuqori versiyalarda ham ishloradimi?Емулятори 4.1.0 ми?
Bita savol boridi Android Studiodan
android sdk da 4.1.0 versiya yuklangan holos. shu versiyaga yozilgan dastur bundan yuqori versiyalarda ham ishloradimi?Емулятори 4.1.0 ми?
MasterOS2, # MasterOS2 (01.04.2020 / 17:27)
developer, Емулятори 4.1.0 ми?bilmayman aynan bunikini lekin SDK toolsda 30.0.5 emulyator ornatilgan korsatib turibdi
developer, Емулятори 4.1.0 ми?bilmayman aynan bunikini lekin SDK toolsda 30.0.5 emulyator ornatilgan korsatib turibdi
developer, # developer (01.04.2020 / 17:30)
MasterOS2, bilmayman aynan bunikini lekin SDK toolsda 30.0.5 emulyator ornatilgan korsatib turibdiБолаверади, буни андроид версияга алокаси ёк, керакли версияни танлаб тузаверасиз.
MasterOS2, bilmayman aynan bunikini lekin SDK toolsda 30.0.5 emulyator ornatilgan korsatib turibdiБолаверади, буни андроид версияга алокаси ёк, керакли версияни танлаб тузаверасиз.
Androidga yaxshi dastur tuza oladigan odamga ish bor)
Puli naqd.
Puli naqd.
Kimda qanday idea bor ?
Birga dastur tuzamiz (aideda) qóldan kelgancha...
15 kun 10 soat 35 daqiqa 33 soniyadan keyin yozdi:
Barchaga salom. Mana ancha bolibdi tepadaga post qoldirganimga ammo hech kimdan nido chiqmadi. Shuning uchun ózim mini kalkulyator tuzishga qaror qildim demak avvalo korinishni qilibolamiz
Main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical"
android:background="#FFFFFF">
<LinearLayout
android:id="@+id/ekran"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical"
android:background="#FDFDFD"
android:layout_alignParentTop="true"
android:padding="7dp">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/maydon1"
android:textSize="18sp"
android:textColor="#000000"
android:typeface="serif"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/maydon2"
android:textSize="18sp"
android:textColor="#000000"
android:typeface="serif"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/maydon3"
android:textSize="18sp"
android:textColor="#000000"
android:typeface="serif"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/maydon4"
android:textSize="18sp"
android:textColor="#000000"
android:typeface="serif"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/maydon5"
android:textSize="18sp"
android:textColor="#000000"
android:typeface="serif"/>
</LinearLayout>
<LinearLayout
android:padding="1dp"
android:id="@+id/raqamlar"
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:gravity="bottom|center"
android:background="#FFFFFF">
<LinearLayout
android:orientation="horizontal"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:background="#FFFFFF"
android:gravity="center|center_vertical">
<Button
android:layout_height="wrap_content"
android:text="C"
android:layout_width="wrap_content"
android:background="#72B0C0"
android:textColor="#FFFFFF"
android:textStyle="bold|normal"
android:layout_marginRight="2dp"
android:id="@+id/tozalash"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="×"
android:layout_width="wrap_content"
android:textColor="#000000"
android:background="#D8D8D8"
android:textStyle="bold|normal"
android:layout_marginRight="2dp"
android:id="@+id/kopaytiruv"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="÷"
android:layout_width="wrap_content"
android:textColor="#000000"
android:background="#D8D8D8"
android:textStyle="bold|normal"
android:layout_marginRight="2dp"
android:id="@+id/boliv"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="D"
android:layout_width="wrap_content"
android:background="#B8554F"
android:textStyle="bold|normal"
android:textColor="#FFFFFF"
android:id="@+id/ochirish"
android:padding="10dp"/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:background="#FFFFFF"
android:gravity="center|center_vertical">
<Button
android:layout_height="wrap_content"
android:text="1"
android:layout_width="wrap_content"
android:textColor="#000000"
android:background="#D8D8D8"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/bir"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="2"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/ikki"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="3"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/uch"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="-"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/ayruv"
android:padding="10dp"/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:background="#FFFFFF"
android:gravity="center|center_vertical">
<Button
android:layout_height="wrap_content"
android:text="4"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/tort"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="5"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/besh"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="6"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/olti"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="+"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/qoshuv"
android:padding="10dp"/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:background="#FFFFFF"
android:gravity="center|center_vertical">
<Button
android:layout_height="wrap_content"
android:text="7"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/yetti"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="8"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/sakkiz"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="9"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/toqqiz"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="0"
android:layout_width="wrap_content"
android:textColor="#000000"
android:background="#D8D8D8"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/nol"
android:padding="10dp"/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:background="#FFFFFF"
android:gravity="center|center_vertical">
<Button
android:layout_height="wrap_content"
android:text="="
android:layout_width="match_parent"
android:background="#141414"
android:textStyle="bold|normal"
android:textColor="#F9F9F9"
android:layout_marginTop="2dp"
android:id="@+id/barobar"
android:padding="10dp"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
package uz.kalkulyator;
//kerakli liblarni ulaymiz
import android.app.*;
import android.os.*;
import android.util.*;
import android.view.*;
import android.widget.*;
import android.content.*;
import java.io.*;
public class MainActivity extends Activity
{
//widgetlarni olamiz
TextView maydon1, maydon2, maydon3, maydon4, maydon5;
LinearLayout raqamlar, ekran;
Button tozalash, kopaytiruv, boluv, ochirish, bir, ikki, uch, ayruv, tort, besh, olti, qoshuv, yetti, sakkiz, toqqiz, nol, barobar;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
//idlarga kirishga ruxsat olamiz
maydon1 = findViewById(R.id.maydon1);
maydon2 = findViewById(R.id.maydon2);
maydon3 = findViewById(R.id.maydon3);
maydon4 = findViewById(R.id.maydon4);
maydon5 = findViewById(R.id.maydon5);
raqamlar = findViewById(R.id.raqamlar);
ekran = findViewById(R.id.ekran);
tozalash = findViewById(R.id.tozalash);
kopaytiruv = findViewById(R.id.kopaytiruv);
boluv = findViewById(R.id.boliv);
ochirish = findViewById(R.id.ochirish);
bir = findViewById(R.id.bir);
ikki = findViewById(R.id.ikki);
uch = findViewById(R.id.uch);
ayruv = findViewById(R.id.ayruv);
tort = findViewById(R.id.tort);
besh = findViewById(R.id.besh);
olti = findViewById(R.id.olti);
qoshuv = findViewById(R.id.qoshuv);
yetti = findViewById(R.id.yetti);
sakkiz = findViewById(R.id.sakkiz);
toqqiz = findViewById(R.id.toqqiz);
nol = findViewById(R.id.nol);
barobar = findViewById(R.id.barobar);
//ekran razmerini olib kerakli amallarni bajaramiz
DisplayMetrics displaymetr = new DisplayMetrics();
WindowManager wm = (WindowManager)getApplicationContext().getSystemService(Context.WINDOW_SERVICE);
wm.getDefaultDisplay().getMetrics(displaymetr);
int ekranwidth = displaymetr.widthPixels;
int ekranheight = displaymetr.heightPixels;
int ekranheightyarim = ekranheight / 2;
int ekranwidthyarim = (ekranwidth / 4) - 2;
int ekranbesh = (ekranheightyarim / 5) - 2;
int fontsize = ekranwidth / 22;
int maydonfontsize = fontsize;
maydon1.setTextSize(22);
maydon2.setTextSize(22);
maydon3.setTextSize(22);
maydon4.setTextSize(22);
maydon5.setTextSize(22);
ekran.setMinimumHeight(ekranheightyarim);
raqamlar.setMinimumHeight(ekranheightyarim);
//tugmalarni width razmerini órnatamiz
tozalash.setWidth(ekranwidthyarim);
kopaytiruv.setWidth(ekranwidthyarim);
boluv.setWidth(ekranwidthyarim);
ochirish.setWidth(ekranwidthyarim);
bir.setWidth(ekranwidthyarim);
ikki.setWidth(ekranwidthyarim);
uch.setWidth(ekranwidthyarim);
tort.setWidth(ekranwidthyarim);
besh.setWidth(ekranwidthyarim);
olti.setWidth(ekranwidthyarim);
yetti.setWidth(ekranwidthyarim);
sakkiz.setWidth(ekranwidthyarim);
toqqiz.setWidth(ekranwidthyarim);
nol.setWidth(ekranwidthyarim);
qoshuv.setWidth(ekranwidthyarim);
qoshuv.setWidth(ekranwidthyarim);
ayruv.setWidth(ekranwidthyarim);
//tugmalarni height razmerini òrnatamiz
tozalash.setHeight(ekranbesh);
kopaytiruv.setHeight(ekranbesh);
boluv.setHeight(ekranbesh);
ochirish.setHeight(ekranbesh);
bir.setHeight(ekranbesh);
ikki.setHeight(ekranbesh);
uch.setHeight(ekranbesh);
tort.setHeight(ekranbesh);
besh.setHeight(ekranbesh);
olti.setHeight(ekranbesh);
yetti.setHeight(ekranbesh);
sakkiz.setHeight(ekranbesh);
toqqiz.setHeight(ekranbesh);
nol.setHeight(ekranbesh);
barobar.setHeight(ekranbesh);
qoshuv.setHeight(ekranbesh);
qoshuv.setHeight(ekranbesh);
ayruv.setHeight(ekranbesh);
//tugmalarni matn kattaligini (fontsize) òrnatamiz
tozalash.setTextSize(fontsize);
kopaytiruv.setTextSize(fontsize);
boluv.setTextSize(fontsize);
ochirish.setTextSize(fontsize);
bir.setTextSize(fontsize);
ikki.setTextSize(fontsize);
uch.setTextSize(fontsize);
tort.setTextSize(fontsize);
besh.setTextSize(fontsize);
olti.setTextSize(fontsize);
yetti.setTextSize(fontsize);
sakkiz.setTextSize(fontsize);
toqqiz.setTextSize(fontsize);
nol.setTextSize(fontsize);
barobar.setTextSize(fontsize);
qoshuv.setTextSize(fontsize);
qoshuv.setTextSize(fontsize);
ayruv.setTextSize(fontsize);
maydon1.setTextSize(maydonfontsize);
maydon2.setTextSize(maydonfontsize);
maydon3.setTextSize(maydonfontsize);
maydon4.setTextSize(maydonfontsize);
maydon5.setTextSize(maydonfontsize);
//tugmalar bosilganda roy beradigan hodisalarni qilamiz
tozalash.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
maydon1.setText("");
maydon2.setText("");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
}
});
ochirish.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
Toast.makeText(getApplicationContext(), "O`chirish hozircha ishlamayapti", Toast.LENGTH_LONG).show();
}
});
kopaytiruv.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn4 = maydon4.getText().toString();
String matn5 = maydon5.getText().toString();
if (matn1 != ""){
maydon2.setText("×");
try {
if (matn4 != "") {
maydon1.setText("" + matn5);
maydon2.setText("×");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
}
} catch (Exception e){
maydon1.setText("");
maydon2.setText("");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
Toast.makeText(getApplicationContext(), "Qoldiqli son mumkin emas!", Toast.LENGTH_LONG).show();
e.printStackTrace();
}
}
}
});
boluv.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn4 = maydon4.getText().toString();
String matn5 = maydon5.getText().toString();
if (matn1 != ""){
maydon2.setText("÷");
try {
if (matn4 != "") {
maydon1.setText("" + matn5);
maydon2.setText("÷");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
}
} catch (Exception e){
maydon1.setText("");
maydon2.setText("");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
Toast.makeText(getApplicationContext(), "Qoldiqli son mumkin emas!", Toast.LENGTH_LONG).show();
e.printStackTrace();
}
}
}
});
ayruv.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn4 = maydon4.getText().toString();
String matn5 = maydon5.getText().toString();
if (matn1 != ""){
maydon2.setText("-");
try {
if (matn4 != "") {
maydon1.setText("" + matn5);
maydon2.setText("-");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
}
} catch (Exception e){
maydon1.setText("");
maydon2.setText("");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
Toast.makeText(getApplicationContext(), "Qoldiqli son mumkin emas!", Toast.LENGTH_LONG).show();
e.printStackTrace();
}
}
}
});
qoshuv.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn4 = maydon4.getText().toString();
String matn5 = maydon5.getText().toString();
if (matn1 != ""){
maydon2.setText("+");
try {
if (matn4 != "") {
maydon1.setText("" + matn5);
maydon2.setText("+");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
}
} catch (Exception e){
maydon1.setText("");
maydon2.setText("");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
Toast.makeText(getApplicationContext(), "Qoldiqli son mumkin emas!", Toast.LENGTH_LONG).show();
e.printStackTrace();
}
}
}
});
barobar.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
try{
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
if (matn3 != "") {
Integer son1 = Integer.parseInt("" + matn1);
Integer son2 = Integer.parseInt("" + matn3);
maydon4.setText("=");
double sona1 = son1;
double sonb2 = son2;
double res;
switch(matn2){
case "+":
res = sona1 + sonb2;
maydon5.setText("" + res);
break;
case "-":
res = sona1 - sonb2;
maydon5.setText("" + res);
break;
case "×":
res = sona1 * sonb2;
maydon5.setText("" + res);
break;
case "÷":
res = sona1 / sonb2;
maydon5.setText("" + res);
break;
default:
res = 0;
}
}
} catch(Exception e){
maydon1.setText("");
maydon2.setText("");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
Toast.makeText(getApplicationContext(), "Qoldiqli son mumkin emas!", Toast.LENGTH_LONG).show();
e.printStackTrace();
}
}
});
bir.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "1");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "1");
}
}
}
});
ikki.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "2");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "2");
}
}
}
});
uch.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "3");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "3");
}
}
}
});
tort.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "4");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "4");
}
}
}
});
besh.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "5");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "5");
}
}
}
});
olti.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "6");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "6");
}
}
}
});
yetti.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "7");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "7");
}
}
}
});
sakkiz.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "8");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "8");
}
}
}
});
toqqiz.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "9");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "9");
}
}
}
});
nol.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "0");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "0");
}
}
}
});
}
public void son(String a) {
Toast.makeText(getApplicationContext(), a, Toast.LENGTH_LONG).show();
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="uz.kalkulyator" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar"
android:resizeableActivity = "true">
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
15 kun 10 soat 37 daqiqa 6 soniyadan keyin yozdi:
Dasturga screen va dasturga namuna(apk fayl) va tayyor kodlar eslatib ótaman kodlar aideda yozilgan.
Birga dastur tuzamiz (aideda) qóldan kelgancha...
15 kun 10 soat 35 daqiqa 33 soniyadan keyin yozdi:
Barchaga salom. Mana ancha bolibdi tepadaga post qoldirganimga ammo hech kimdan nido chiqmadi. Shuning uchun ózim mini kalkulyator tuzishga qaror qildim demak avvalo korinishni qilibolamiz
Main.xml
main.xml kodlari (+/-)
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical"
android:background="#FFFFFF">
<LinearLayout
android:id="@+id/ekran"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical"
android:background="#FDFDFD"
android:layout_alignParentTop="true"
android:padding="7dp">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/maydon1"
android:textSize="18sp"
android:textColor="#000000"
android:typeface="serif"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/maydon2"
android:textSize="18sp"
android:textColor="#000000"
android:typeface="serif"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/maydon3"
android:textSize="18sp"
android:textColor="#000000"
android:typeface="serif"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/maydon4"
android:textSize="18sp"
android:textColor="#000000"
android:typeface="serif"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/maydon5"
android:textSize="18sp"
android:textColor="#000000"
android:typeface="serif"/>
</LinearLayout>
<LinearLayout
android:padding="1dp"
android:id="@+id/raqamlar"
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:gravity="bottom|center"
android:background="#FFFFFF">
<LinearLayout
android:orientation="horizontal"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:background="#FFFFFF"
android:gravity="center|center_vertical">
<Button
android:layout_height="wrap_content"
android:text="C"
android:layout_width="wrap_content"
android:background="#72B0C0"
android:textColor="#FFFFFF"
android:textStyle="bold|normal"
android:layout_marginRight="2dp"
android:id="@+id/tozalash"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="×"
android:layout_width="wrap_content"
android:textColor="#000000"
android:background="#D8D8D8"
android:textStyle="bold|normal"
android:layout_marginRight="2dp"
android:id="@+id/kopaytiruv"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="÷"
android:layout_width="wrap_content"
android:textColor="#000000"
android:background="#D8D8D8"
android:textStyle="bold|normal"
android:layout_marginRight="2dp"
android:id="@+id/boliv"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="D"
android:layout_width="wrap_content"
android:background="#B8554F"
android:textStyle="bold|normal"
android:textColor="#FFFFFF"
android:id="@+id/ochirish"
android:padding="10dp"/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:background="#FFFFFF"
android:gravity="center|center_vertical">
<Button
android:layout_height="wrap_content"
android:text="1"
android:layout_width="wrap_content"
android:textColor="#000000"
android:background="#D8D8D8"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/bir"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="2"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/ikki"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="3"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/uch"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="-"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/ayruv"
android:padding="10dp"/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:background="#FFFFFF"
android:gravity="center|center_vertical">
<Button
android:layout_height="wrap_content"
android:text="4"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/tort"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="5"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/besh"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="6"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/olti"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="+"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/qoshuv"
android:padding="10dp"/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:background="#FFFFFF"
android:gravity="center|center_vertical">
<Button
android:layout_height="wrap_content"
android:text="7"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/yetti"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="8"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/sakkiz"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="9"
android:background="#D8D8D8"
android:textColor="#000000"
android:layout_width="wrap_content"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/toqqiz"
android:padding="10dp"/>
<Button
android:layout_height="wrap_content"
android:text="0"
android:layout_width="wrap_content"
android:textColor="#000000"
android:background="#D8D8D8"
android:layout_marginRight="2dp"
android:textStyle="bold|normal"
android:layout_marginTop="2dp"
android:id="@+id/nol"
android:padding="10dp"/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:background="#FFFFFF"
android:gravity="center|center_vertical">
<Button
android:layout_height="wrap_content"
android:text="="
android:layout_width="match_parent"
android:background="#141414"
android:textStyle="bold|normal"
android:textColor="#F9F9F9"
android:layout_marginTop="2dp"
android:id="@+id/barobar"
android:padding="10dp"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
mainactivity.java kodlari (+/-)
package uz.kalkulyator;
//kerakli liblarni ulaymiz
import android.app.*;
import android.os.*;
import android.util.*;
import android.view.*;
import android.widget.*;
import android.content.*;
import java.io.*;
public class MainActivity extends Activity
{
//widgetlarni olamiz
TextView maydon1, maydon2, maydon3, maydon4, maydon5;
LinearLayout raqamlar, ekran;
Button tozalash, kopaytiruv, boluv, ochirish, bir, ikki, uch, ayruv, tort, besh, olti, qoshuv, yetti, sakkiz, toqqiz, nol, barobar;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
//idlarga kirishga ruxsat olamiz
maydon1 = findViewById(R.id.maydon1);
maydon2 = findViewById(R.id.maydon2);
maydon3 = findViewById(R.id.maydon3);
maydon4 = findViewById(R.id.maydon4);
maydon5 = findViewById(R.id.maydon5);
raqamlar = findViewById(R.id.raqamlar);
ekran = findViewById(R.id.ekran);
tozalash = findViewById(R.id.tozalash);
kopaytiruv = findViewById(R.id.kopaytiruv);
boluv = findViewById(R.id.boliv);
ochirish = findViewById(R.id.ochirish);
bir = findViewById(R.id.bir);
ikki = findViewById(R.id.ikki);
uch = findViewById(R.id.uch);
ayruv = findViewById(R.id.ayruv);
tort = findViewById(R.id.tort);
besh = findViewById(R.id.besh);
olti = findViewById(R.id.olti);
qoshuv = findViewById(R.id.qoshuv);
yetti = findViewById(R.id.yetti);
sakkiz = findViewById(R.id.sakkiz);
toqqiz = findViewById(R.id.toqqiz);
nol = findViewById(R.id.nol);
barobar = findViewById(R.id.barobar);
//ekran razmerini olib kerakli amallarni bajaramiz
DisplayMetrics displaymetr = new DisplayMetrics();
WindowManager wm = (WindowManager)getApplicationContext().getSystemService(Context.WINDOW_SERVICE);
wm.getDefaultDisplay().getMetrics(displaymetr);
int ekranwidth = displaymetr.widthPixels;
int ekranheight = displaymetr.heightPixels;
int ekranheightyarim = ekranheight / 2;
int ekranwidthyarim = (ekranwidth / 4) - 2;
int ekranbesh = (ekranheightyarim / 5) - 2;
int fontsize = ekranwidth / 22;
int maydonfontsize = fontsize;
maydon1.setTextSize(22);
maydon2.setTextSize(22);
maydon3.setTextSize(22);
maydon4.setTextSize(22);
maydon5.setTextSize(22);
ekran.setMinimumHeight(ekranheightyarim);
raqamlar.setMinimumHeight(ekranheightyarim);
//tugmalarni width razmerini órnatamiz
tozalash.setWidth(ekranwidthyarim);
kopaytiruv.setWidth(ekranwidthyarim);
boluv.setWidth(ekranwidthyarim);
ochirish.setWidth(ekranwidthyarim);
bir.setWidth(ekranwidthyarim);
ikki.setWidth(ekranwidthyarim);
uch.setWidth(ekranwidthyarim);
tort.setWidth(ekranwidthyarim);
besh.setWidth(ekranwidthyarim);
olti.setWidth(ekranwidthyarim);
yetti.setWidth(ekranwidthyarim);
sakkiz.setWidth(ekranwidthyarim);
toqqiz.setWidth(ekranwidthyarim);
nol.setWidth(ekranwidthyarim);
qoshuv.setWidth(ekranwidthyarim);
qoshuv.setWidth(ekranwidthyarim);
ayruv.setWidth(ekranwidthyarim);
//tugmalarni height razmerini òrnatamiz
tozalash.setHeight(ekranbesh);
kopaytiruv.setHeight(ekranbesh);
boluv.setHeight(ekranbesh);
ochirish.setHeight(ekranbesh);
bir.setHeight(ekranbesh);
ikki.setHeight(ekranbesh);
uch.setHeight(ekranbesh);
tort.setHeight(ekranbesh);
besh.setHeight(ekranbesh);
olti.setHeight(ekranbesh);
yetti.setHeight(ekranbesh);
sakkiz.setHeight(ekranbesh);
toqqiz.setHeight(ekranbesh);
nol.setHeight(ekranbesh);
barobar.setHeight(ekranbesh);
qoshuv.setHeight(ekranbesh);
qoshuv.setHeight(ekranbesh);
ayruv.setHeight(ekranbesh);
//tugmalarni matn kattaligini (fontsize) òrnatamiz
tozalash.setTextSize(fontsize);
kopaytiruv.setTextSize(fontsize);
boluv.setTextSize(fontsize);
ochirish.setTextSize(fontsize);
bir.setTextSize(fontsize);
ikki.setTextSize(fontsize);
uch.setTextSize(fontsize);
tort.setTextSize(fontsize);
besh.setTextSize(fontsize);
olti.setTextSize(fontsize);
yetti.setTextSize(fontsize);
sakkiz.setTextSize(fontsize);
toqqiz.setTextSize(fontsize);
nol.setTextSize(fontsize);
barobar.setTextSize(fontsize);
qoshuv.setTextSize(fontsize);
qoshuv.setTextSize(fontsize);
ayruv.setTextSize(fontsize);
maydon1.setTextSize(maydonfontsize);
maydon2.setTextSize(maydonfontsize);
maydon3.setTextSize(maydonfontsize);
maydon4.setTextSize(maydonfontsize);
maydon5.setTextSize(maydonfontsize);
//tugmalar bosilganda roy beradigan hodisalarni qilamiz
tozalash.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
maydon1.setText("");
maydon2.setText("");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
}
});
ochirish.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
Toast.makeText(getApplicationContext(), "O`chirish hozircha ishlamayapti", Toast.LENGTH_LONG).show();
}
});
kopaytiruv.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn4 = maydon4.getText().toString();
String matn5 = maydon5.getText().toString();
if (matn1 != ""){
maydon2.setText("×");
try {
if (matn4 != "") {
maydon1.setText("" + matn5);
maydon2.setText("×");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
}
} catch (Exception e){
maydon1.setText("");
maydon2.setText("");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
Toast.makeText(getApplicationContext(), "Qoldiqli son mumkin emas!", Toast.LENGTH_LONG).show();
e.printStackTrace();
}
}
}
});
boluv.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn4 = maydon4.getText().toString();
String matn5 = maydon5.getText().toString();
if (matn1 != ""){
maydon2.setText("÷");
try {
if (matn4 != "") {
maydon1.setText("" + matn5);
maydon2.setText("÷");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
}
} catch (Exception e){
maydon1.setText("");
maydon2.setText("");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
Toast.makeText(getApplicationContext(), "Qoldiqli son mumkin emas!", Toast.LENGTH_LONG).show();
e.printStackTrace();
}
}
}
});
ayruv.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn4 = maydon4.getText().toString();
String matn5 = maydon5.getText().toString();
if (matn1 != ""){
maydon2.setText("-");
try {
if (matn4 != "") {
maydon1.setText("" + matn5);
maydon2.setText("-");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
}
} catch (Exception e){
maydon1.setText("");
maydon2.setText("");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
Toast.makeText(getApplicationContext(), "Qoldiqli son mumkin emas!", Toast.LENGTH_LONG).show();
e.printStackTrace();
}
}
}
});
qoshuv.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn4 = maydon4.getText().toString();
String matn5 = maydon5.getText().toString();
if (matn1 != ""){
maydon2.setText("+");
try {
if (matn4 != "") {
maydon1.setText("" + matn5);
maydon2.setText("+");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
}
} catch (Exception e){
maydon1.setText("");
maydon2.setText("");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
Toast.makeText(getApplicationContext(), "Qoldiqli son mumkin emas!", Toast.LENGTH_LONG).show();
e.printStackTrace();
}
}
}
});
barobar.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
try{
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
if (matn3 != "") {
Integer son1 = Integer.parseInt("" + matn1);
Integer son2 = Integer.parseInt("" + matn3);
maydon4.setText("=");
double sona1 = son1;
double sonb2 = son2;
double res;
switch(matn2){
case "+":
res = sona1 + sonb2;
maydon5.setText("" + res);
break;
case "-":
res = sona1 - sonb2;
maydon5.setText("" + res);
break;
case "×":
res = sona1 * sonb2;
maydon5.setText("" + res);
break;
case "÷":
res = sona1 / sonb2;
maydon5.setText("" + res);
break;
default:
res = 0;
}
}
} catch(Exception e){
maydon1.setText("");
maydon2.setText("");
maydon3.setText("");
maydon4.setText("");
maydon5.setText("");
Toast.makeText(getApplicationContext(), "Qoldiqli son mumkin emas!", Toast.LENGTH_LONG).show();
e.printStackTrace();
}
}
});
bir.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "1");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "1");
}
}
}
});
ikki.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "2");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "2");
}
}
}
});
uch.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "3");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "3");
}
}
}
});
tort.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "4");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "4");
}
}
}
});
besh.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "5");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "5");
}
}
}
});
olti.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "6");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "6");
}
}
}
});
yetti.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "7");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "7");
}
}
}
});
sakkiz.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "8");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "8");
}
}
}
});
toqqiz.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "9");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "9");
}
}
}
});
nol.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View p1) {
String matn1 = maydon1.getText().toString();
String matn2 = maydon2.getText().toString();
String matn3 = maydon3.getText().toString();
String matn4 = maydon4.getText().toString();
if (matn2 == "") {
maydon1.setText(matn1 + "0");
} else {
if (matn4 == "") {
maydon3.setText(matn3 + "0");
}
}
}
});
}
public void son(String a) {
Toast.makeText(getApplicationContext(), a, Toast.LENGTH_LONG).show();
}
}
androidmanifest.xml kodlari (+/-)
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="uz.kalkulyator" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar"
android:resizeableActivity = "true">
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
15 kun 10 soat 37 daqiqa 6 soniyadan keyin yozdi:
Dasturga screen va dasturga namuna(apk fayl) va tayyor kodlar eslatib ótaman kodlar aideda yozilgan.
+ (1): MasterOS2,
Mana
+ (1): MasterOS2,
Biriktirilgan fayllar [3]:
— uzkalkulyator.jpg (34.45 KB) (122 ↴)
— tayota-uzkalkulyator.zip (385.88 KB) (112 ↴)
— uzkalkulyator.apk (89.01 KB) (126 ↴)
— uzkalkulyator.jpg (34.45 KB) (122 ↴)
— tayota-uzkalkulyator.zip (385.88 KB) (112 ↴)
— uzkalkulyator.apk (89.01 KB) (126 ↴)
Dangalchi, # Dangalchi (23.04.2020 / 23:38)
ManaАжойиб ишлаяпти ?
ManaАжойиб ишлаяпти ?
+ (1): Tayota,
Biriktirilgan fayllar [1]:
— screenshot_20200424-002106.png (23.85 KB) (105 ↴)
— screenshot_20200424-002106.png (23.85 KB) (105 ↴)
MasterOS2, # MasterOS2 (24.04.2020 / 00:21)
Dangalchi, Ажойиб ишлаяпти ?Xmlda eni boyiga foiz bilan ishlash bolmaganiga ancha bosh qotirtirdi...
Hozircha bitta muammo bor
1+2=3.0 chiqanda yana + ili - qilsez
3.0+yana tanlagan soniz = qisez error bervoryapti. Int bolmagani uchun. Shuning uchun try catch qb qóydim. Tishiz ótsa yordam bervoring. Adashmasam + ga kod yazib kament qb qóyganman. Ikkinchi marta hisoblash uchun shuni tuzatish kerak
Dangalchi, Ажойиб ишлаяпти ?Xmlda eni boyiga foiz bilan ishlash bolmaganiga ancha bosh qotirtirdi...
Hozircha bitta muammo bor
1+2=3.0 chiqanda yana + ili - qilsez
3.0+yana tanlagan soniz = qisez error bervoryapti. Int bolmagani uchun. Shuning uchun try catch qb qóydim. Tishiz ótsa yordam bervoring. Adashmasam + ga kod yazib kament qb qóyganman. Ikkinchi marta hisoblash uchun shuni tuzatish kerak
Dangalchi, # Dangalchi (24.04.2020 / 00:35)
MasterOS2, Xmlda eni boyiga foiz bilan ishlash bolmaganiga ancha bosh qotirtirdi...
Hozircha bitta muammo bor
1+2=3.0 chiqanda yana + ili - qilsez
3.0+yana tanlagan soniz = qisez error bervoryapСин, тан, косинус, кавс, илдиз ости кошиб корингчи. Олдин ушбу кодлардан намуна олиб койинг, кейин мен айтганларимни кошиб коринг.
MasterOS2, Xmlda eni boyiga foiz bilan ishlash bolmaganiga ancha bosh qotirtirdi...
Hozircha bitta muammo bor
1+2=3.0 chiqanda yana + ili - qilsez
3.0+yana tanlagan soniz = qisez error bervoryapСин, тан, косинус, кавс, илдиз ости кошиб корингчи. Олдин ушбу кодлардан намуна олиб койинг, кейин мен айтганларимни кошиб коринг.
MasterOS2, # MasterOS2 (24.04.2020 / 01:24)
Dangalchi, Син, тан, косинус, кавс, илдиз ости кошиб корингчи. Олдин ушбу кодлардан намуна олиб койинг, кейин мен айтганларимни кошиб коринг.Ularni textviewga qóshib natijani olish qólimdan kelmaydi?
Dangalchi, Син, тан, косинус, кавс, илдиз ости кошиб корингчи. Олдин ушбу кодлардан намуна олиб койинг, кейин мен айтганларимни кошиб коринг.Ularni textviewga qóshib natijani olish qólimdan kelmaydi?
+ (1): MasterOS2,
Hammaga salom!
Diqqat qiling hali hech kimga malum bolmagan yangi "Energy" demonstratsiyasini taqdim qilamiz. Qanchalik aqllisiz tushuna olasizmi?
*- Ekranga bosmaslikka harakat qiling, haqiqiy manzarani korish uchun.
Diqqat qiling hali hech kimga malum bolmagan yangi "Energy" demonstratsiyasini taqdim qilamiz. Qanchalik aqllisiz tushuna olasizmi?
*- Ekranga bosmaslikka harakat qiling, haqiqiy manzarani korish uchun.
Biriktirilgan fayllar [1]:
— sehn.apk (2849.87 KB) (142 ↴)
— sehn.apk (2849.87 KB) (142 ↴)
Xolmat, # Xolmat (29.04.2020 / 19:29)
Php va apachedan foydalanib android ilova tuzsa boladimaАлбатта
Php va apachedan foydalanib android ilova tuzsa boladimaАлбатта
MasterOS2, # MasterOS2 (29.04.2020 / 19:58)
Xolmat, АлбаттаIltimos shuni qanday tuzsa bulardi o'rgativoring yo manba busa korsating oldindan rahmat
Xolmat, АлбаттаIltimos shuni qanday tuzsa bulardi o'rgativoring yo manba busa korsating oldindan rahmat
Xolmat, # Xolmat (29.04.2020 / 23:17)
MasterOS2, Iltimos shuni qanday tuzsa bulardi o'rgativoring yo manba busa korsating oldindan rahmatКейинрок
MasterOS2, Iltimos shuni qanday tuzsa bulardi o'rgativoring yo manba busa korsating oldindan rahmatКейинрок
coder, # coder (03.09.2020 / 00:36)
Tayota, Apk tayorlash darslari bor saytga link bervoring Youtube.
1. Androidga dastur tuzish. (Akramjon dars ótgan adashmasam tepada ham link bergan edim poisk qisez ózi youtubedan chiqadi)
2. Uzbekcoder.uz
40 kun 1 soat 13 daqiqa 48 soniyadan keyin yozdi:
Aideda v7 libni ishlatsam dastur ishlami qovoti nimadan bolishi mumkin
Tayota, Apk tayorlash darslari bor saytga link bervoring Youtube.
1. Androidga dastur tuzish. (Akramjon dars ótgan adashmasam tepada ham link bergan edim poisk qisez ózi youtubedan chiqadi)
2. Uzbekcoder.uz
40 kun 1 soat 13 daqiqa 48 soniyadan keyin yozdi:
Aideda v7 libni ishlatsam dastur ishlami qovoti nimadan bolishi mumkin
Tavsiya etamiz:
- Hoziroq maydonlarni to'ldiring va reklamangizni joylashtiring!
Mavzuga oid xabarlar soni: 73 ta
So'ngi faollik vaqti: 00:49:40, 7 Jun 2021
Mavzu moderatori: Ⓜⓐⓢⓣⓔⓡⓞⓢ