Amaliyot hisoboti



Yüklə 1,18 Mb.
səhifə3/3
tarix28.09.2023
ölçüsü1,18 Mb.
#150150
1   2   3
HISOBOT

Idea va tahlil: Bu bosqichda, ilova haqida tushuncha ishlab chiqiladi, loyiha maqsadlari aniqlanadi va kerakli funksiyalar belgilanadi. Bundan tashqari, raqobatbaxsh analiz va biznes modeli oylangan bo'ladi.

  • Dizayn: Bu bosqichda, ilovaning foydalanuvchi interfeysi (UI) va tajribasi (UX) ishlab chiqiladi. Dizaynerlar loyihaning prototipi va grafik elementlari yaratish uchun ishlaydi.

  • Texnik xizmat ko'rsatish: Bu bosqichda, ilova ishlab chiqaruvchilari kerakli texnologiyalar va asbob-uskunalarni tanlaydilar, masalan, dasturlash tillari, platformalar, fremvorklar, SDK va API-lar.

  • Ishlab chiqish: Bu bosqichda, dasturchilar ilovaning funksiyalarini kodlash orqali amalga oshiradi. Ushbu jarayon mobi platformalar (iOS, Android yoki boshqalar) uchun alohida amalga oshirilishi mumkin.

  • Testlash: Bu bosqichda, ilova xatolari va kamchiliklarini topish maqsadida test qilinadi. Testlash jarayoni foydalanuvchi testlari, avtomatlashtirilgan testlar va stress testlari kabi turli usullardan foydalaniladi.

  • Ishga tushirish: Ishlab chiqilgan ilovani app store'larda (Google Play, App Store va boshqalar) joylashtirish va foydalanuvchilarga taqdim etish bu bosqichda amalga oshiriladi.

  • Ilovani rivojlantirish va qo'llab-quvvatlash: Ilovani yangilash, yangi funksiyalar qo'shish, xatolarni to'g'rilash va foydalanuvchi qo'llab-quvvatlash uchun mutaxassislar bilan ishlash davom etadi.

    Yuqoridagi bosqichlar ilovani ishlab chiqarish jarayonida asosiy vazifalar bo'lib, ular ilova sifatini va foydalanuvchi tajribasini yaxshilashga yordam beradi.

    xmlns:tools="http://schemas.android.com/tools"
    package="com.xudayberganovarohila.bmi_tatu">


    android:name="android.permission.READ_EXTERNAL_STORAGE"
    android:maxSdkVersion="32" />


    android:allowBackup="true"
    android:dataExtractionRules="@xml/data_extraction_rules"
    android:fullBackupContent="@xml/backup_rules"
    android:icon="@drawable/icon"
    android:label="@string/app_name"
    android:roundIcon="@drawable/icon"
    android:supportsRtl="true"
    android:theme="@style/Theme.BMI_tatu"
    tools:targetApi="31">
    android:name=".Admin_User_Data"
    android:exported="false" />
    android:name=".Make_Order"
    android:exported="false" />
    android:name=".Order_datails"
    android:exported="false" />
    android:name=".Signin"
    android:exported="false" />
    android:name=".Signup"
    android:exported="false" />
    android:name=".Admin"
    android:exported="false" />
    android:name=".Splash_Screen"
    android:exported="true">






    android:name=".MainActivity"
    android:exported="false" />



    package com.xudayberganovarohila.bmi_tatu;

    import android.os.Bundle;


    import android.widget.Toast;

    import androidx.annotation.NonNull;


    import androidx.appcompat.app.AppCompatActivity;
    import androidx.recyclerview.widget.LinearLayoutManager;
    import androidx.recyclerview.widget.RecyclerView;

    import com.google.firebase.database.DataSnapshot;


    import com.google.firebase.database.DatabaseError;
    import com.google.firebase.database.DatabaseReference;
    import com.google.firebase.database.FirebaseDatabase;
    import com.google.firebase.database.ValueEventListener;

    import java.util.ArrayList;

    public class Admin extends AppCompatActivity {

    private ArrayList usersist;


    private Admin_User_Adapter admin_user_adapter;
    DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReferenceFromUrl("https://bmi-tatu-default-rtdb.firebaseio.com/");

    @Override


    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_admin);
    try {

    User_info user = new User_info();

    RecyclerView recyclerView = findViewById(R.id.order_view_admin);

    recyclerView.setHasFixedSize(true);


    recyclerView.setLayoutManager(new LinearLayoutManager(this));

    usersist = new ArrayList<>();

    admin_user_adapter = new Admin_User_Adapter(Admin.this, usersist);

    recyclerView.setAdapter(admin_user_adapter);

    databaseReference = FirebaseDatabase.getInstance().getReference("users");
    databaseReference.addValueEventListener(new ValueEventListener() {
    @Override
    public void onDataChange(@NonNull DataSnapshot snapshot) {
    for (DataSnapshot dataSnapshot : snapshot.getChildren()) {
    User userad = dataSnapshot.getValue(User.class);
    usersist.add(userad);
    }
    admin_user_adapter.notifyDataSetChanged();

    }

    @Override


    public void onCancelled(@NonNull DatabaseError error) {

    }
    });


    } catch (Exception e) {


    Toast.makeText(this, "xatolik " + e, Toast.LENGTH_SHORT).show();
    }

    }


    }

    package com.xasanboyevdiyorbek.bmi_tatu;


    import android.app.ActivityOptions;


    import android.content.Intent;
    import android.os.Build;
    import android.os.Bundle;
    import android.os.Handler;
    import android.os.Looper;
    import android.util.Pair;
    import android.view.View;
    import android.widget.Button;
    import android.widget.ImageView;
    import android.widget.ProgressBar;
    import android.widget.TextView;
    import android.widget.Toast;

    import androidx.annotation.NonNull;


    import androidx.annotation.RequiresApi;
    import androidx.appcompat.app.AppCompatActivity;

    import com.google.android.material.textfield.TextInputEditText;


    import com.google.firebase.database.DataSnapshot;
    import com.google.firebase.database.DatabaseError;
    import com.google.firebase.database.DatabaseReference;
    import com.google.firebase.database.FirebaseDatabase;
    import com.google.firebase.database.ValueEventListener;

    public class Signin extends AppCompatActivity {


    Button hisobyarat, go;
    ImageView image;
    TextView textView, tv2;
    TextInputEditText login, parol;

    ProgressBar progressBar;

    DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReferenceFromUrl("https://bmi-tatu-default-rtdb.firebaseio.com/");

    @Override


    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setContentView(R.layout.activity_signin);

    //bu yerda layout oynasidan id bo`yicha kerakli elementlar topib olingan


    login = findViewById(R.id.login1);


    parol = findViewById(R.id.parol);

    go = findViewById(R.id.go_one);

    image = findViewById(R.id.iconloginuchun);
    textView = findViewById(R.id.logoname);
    tv2 = findViewById(R.id.kirishuchun);
    hisobyarat = findViewById(R.id.hisob_yaratish);

    progressBar = findViewById(R.id.proreesbar);


    go.setOnClickListener(new View.OnClickListener() {


    @Override
    public void onClick(View view) {
    progressBar.setVisibility(View.VISIBLE);
    final String Slogini, Sparoli;

    Slogini = String.valueOf(login.getText());


    Sparoli = String.valueOf(parol.getText());

    if (Slogini.isEmpty()) {


    login.setError("Iltimos loginingizni kiriting");
    login.requestFocus();
    progressBar.setVisibility(View.GONE);

    } else if (Sparoli.isEmpty()) {


    parol.setError("Iltimos parolingizni kiriting");
    parol.requestFocus();
    progressBar.setVisibility(View.GONE);
    } else if (!(Slogini.isEmpty() && Sparoli.isEmpty())) {

    if (Slogini.equals("Admin") && Sparoli.equals("Admin")) {


    Intent intent = new Intent(Signin.this, Admin.class);
    startActivity(intent);
    finish();

    } else {

    databaseReference.child("users").addListenerForSingleValueEvent(new ValueEventListener() {
    @Override
    public void onDataChange(@NonNull DataSnapshot snapshot) {
    if (snapshot.hasChild(Slogini)) {

    final String getpassword = snapshot.child(Slogini).child("parol").getValue(String.class);

    if (getpassword.equals(Sparoli)) {
    Toast.makeText(Signin.this, "Muaffaqiyatli amalga oshirildi", Toast.LENGTH_SHORT).show();
    Intent intent = new Intent(Signin.this, MainActivity.class);
    User_info user_info=new User_info();
    user_info.setName(Slogini);
    startActivity(intent);
    finish();
    } else {
    Toast.makeText(Signin.this, "Xato parol kiritildi", Toast.LENGTH_SHORT).show();
    progressBar.setVisibility(View.GONE);
    }
    } else {
    Toast.makeText(Signin.this, "Xato login kiritildi", Toast.LENGTH_SHORT).show();
    progressBar.setVisibility(View.GONE);
    }

    }

    @Override


    public void onCancelled(@NonNull DatabaseError error) {

    }
    });


    }


    Handler handler = new Handler(Looper.getMainLooper());
    handler.post(new Runnable() {
    @Override
    public void run() {

    }
    });


    } else {
    Toast.makeText(Signin.this,
    "Xato yuz berdi! :-( ",
    Toast.LENGTH_SHORT).show();
    }

    }
    });

    hisobyarat.setOnClickListener(new View.OnClickListener() {
    @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
    @Override
    public void onClick(View view) {
    Intent intent = new Intent(Signin.this, Signup.class);
    Pair[] pairs = new Pair[3];
    pairs[0] = new Pair(image, "logo_image");
    pairs[1] = new Pair(textView, "logo_text");
    pairs[2] = new Pair(tv2, "logotext2");

    ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(Signin.this, pairs);


    startActivity(intent, options.toBundle());
    }
    });
    }
    }



    1-rasm.Admin yoki foydalanuvchi kirish qismi

    2-rasm.Mijozlarni kuzatish qismi

    3-rasm.Mijozni nazorat qiluvchi qism
    package com.xudayberganovarohila.bmi_tatu;

    import android.content.Context;


    import android.content.Intent;
    import android.view.LayoutInflater;
    import android.view.View;
    import android.view.ViewGroup;
    import android.widget.TextView;
    import android.widget.Toast;

    import androidx.annotation.NonNull;


    import androidx.recyclerview.widget.RecyclerView;

    import java.util.ArrayList;

    public class Admin_User_Adapter extends RecyclerView.Adapter {

    private final Context context;


    ArrayList list;

    public Admin_User_Adapter(Context context, ArrayList list) {


    this.context = context;
    this.list = list;
    }

    @NonNull
    @Override


    public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
    View v = LayoutInflater.from(context).inflate(R.layout.admin_order_item, parent, false);
    return new MyViewHolder(v);
    }

    @Override


    public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
    User user = list.get(position);
    holder.ismi.setText(user.getIsmi());
    holder.email.setText(user.getEmail());

    }

    @Override


    public int getItemCount() {
    return list.size();
    }

    public class MyViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {


    TextView ismi, email;

    public MyViewHolder(View itemview) {


    super(itemview);
    ismi = itemview.findViewById(R.id.usernameid);
    email = itemview.findViewById(R.id.emailid);

    itemview.setOnClickListener(this);


    }

    @Override


    public void onClick(View view) {
    try {
    int positions = getAdapterPosition();
    Intent intent = new Intent(context, Admin_User_Data.class);

    intent.putExtra("name", list.get(positions).ismi);


    intent.putExtra("login", list.get(positions).login);
    intent.putExtra("email", list.get(positions).email);
    intent.putExtra("phone", list.get(positions).phone);

    context.startActivity(intent);


    }
    catch (Exception exception){

    Toast.makeText(context,"Adapter"+exception.getMessage() , Toast.LENGTH_SHORT).show();

    }

    }
    }


    }



    4-rasm.Mijoz ro’yxatdan o’tuvchi qism

    5-rasm.Dasturni mijoz kuzatadigan qismi
    package com.xudayberganovarohila.bmi_tatu;

    import android.content.Context;


    import android.content.Intent;
    import android.view.LayoutInflater;
    import android.view.View;
    import android.view.ViewGroup;
    import android.widget.TextView;
    import android.widget.Toast;

    import androidx.annotation.NonNull;


    import androidx.recyclerview.widget.RecyclerView;

    import java.util.ArrayList;

    public class Admin_Orders_Adapter extends RecyclerView.Adapter {

    private Context context;


    ArrayList list;

    public Admin_Orders_Adapter(Context context, ArrayList list) {


    this.context = context;
    this.list = list;
    }

    @NonNull
    @Override


    public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
    View v = LayoutInflater.from(context).inflate(R.layout.item, parent, false);
    return new MyViewHolder(v);
    }

    @Override


    public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
    Orders order = list.get(position);

    holder.product.setText(order.getProduct());


    holder.count.setText(order.getCount());

    }

    @Override


    public int getItemCount() {
    return list.size();
    }

    public class MyViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {


    TextView product,count;

    public MyViewHolder(View itemview) {


    super(itemview);

    product = itemview.findViewById(R.id.ismi);


    count = itemview.findViewById(R.id.email);

    itemview.setOnClickListener(this);


    }

    @Override


    public void onClick(View view) {
    try {
    int positions = getAdapterPosition();
    // Toast.makeText(context, " " + positions + "-bosildi!", Toast.LENGTH_SHORT).show();
    Intent intent = new Intent(context, Order_datails.class);

    intent.putExtra("product", list.get(positions).product);


    intent.putExtra("weight", list.get(positions).weight);
    intent.putExtra("height", list.get(positions).hieght);
    intent.putExtra("addition", list.get(positions).addition);
    intent.putExtra("count", list.get(positions).count);

    context.startActivity(intent);


    }
    catch (Exception exception){

    Toast.makeText(context,"Adapter"+exception.getMessage() , Toast.LENGTH_SHORT).show();

    }

    }
    }


    }

    package com.xudayberganovarohila.bmi_tatu;

    import android.os.Bundle;
    import android.view.View;
    import android.widget.Button;
    import android.widget.Toast;

    import androidx.annotation.NonNull;


    import androidx.appcompat.app.AppCompatActivity;

    import com.google.android.material.textfield.TextInputEditText;


    import com.google.firebase.database.DataSnapshot;
    import com.google.firebase.database.DatabaseError;
    import com.google.firebase.database.DatabaseReference;
    import com.google.firebase.database.FirebaseDatabase;
    import com.google.firebase.database.ValueEventListener;

    import java.util.UUID;

    public class Make_Order extends AppCompatActivity {
    Button addorder;
    TextInputEditText product, height, weight, count, addition;
    DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReferenceFromUrl("https://bmi-tatu-default-rtdb.firebaseio.com/");

    @Override


    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_make_order);

    addorder = findViewById(R.id.addorder);


    product = findViewById(R.id.producttxt);
    height = findViewById(R.id.heighttxt);
    weight = findViewById(R.id.weighttxt);
    count = findViewById(R.id.counttxt);
    addition = findViewById(R.id.additiontxt);

    User_info user_info = new User_info();


    String logini = user_info.getName();

    Toast.makeText(this, logini, Toast.LENGTH_SHORT).show();

    addorder.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
    String producttxt = product.getText().toString();
    String weighttxt = weight.getText().toString();
    String heighttxt = height.getText().toString();
    String counttxt = count.getText().toString();
    String additiontxt = addition.getText().toString();

    databaseReference.child("Orders").addListenerForSingleValueEvent(new ValueEventListener() {


    @Override
    public void onDataChange(@NonNull DataSnapshot snapshot) {
    String uniqueID = UUID.randomUUID().toString();

    databaseReference.child("Orders").child(logini).child(uniqueID).child("product").setValue(producttxt);


    databaseReference.child("Orders").child(logini).child(uniqueID).child("weight").setValue(weighttxt);
    databaseReference.child("Orders").child(logini).child(uniqueID).child("hieght").setValue(heighttxt);
    databaseReference.child("Orders").child(logini).child(uniqueID).child("count").setValue(counttxt);
    databaseReference.child("Orders").child(logini).child(uniqueID).child("addition").setValue(additiontxt);

    Toast.makeText(Make_Order.this, "Buyurma berish yakunlandi!!!", Toast.LENGTH_SHORT).show();


    finish();
    }

    @Override


    public void onCancelled(@NonNull DatabaseError error) {
    }
    });

    }
    });

    }
    }



    6-rasm.Mijozni buyurtma berish qismi
    package com.xudayberganovarohila.bmi_tatu;

    import android.content.Context;


    import android.content.Intent;
    import android.view.LayoutInflater;
    import android.view.View;
    import android.view.ViewGroup;
    import android.widget.TextView;
    import android.widget.Toast;

    import androidx.annotation.NonNull;


    import androidx.recyclerview.widget.RecyclerView;

    import java.util.ArrayList;

    public class MyOrders_Adapter extends RecyclerView.Adapter {

    private Context context;


    ArrayList list;

    public MyOrders_Adapter(Context context, ArrayList list) {


    this.context = context;
    this.list = list;
    }

    @NonNull
    @Override


    public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
    View v = LayoutInflater.from(context).inflate(R.layout.item, parent, false);
    return new MyViewHolder(v);
    }

    @Override


    public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
    Orders order = list.get(position);

    holder.product.setText(order.getProduct());


    holder.count.setText(order.getCount());

    }

    @Override


    public int getItemCount() {
    return list.size();
    }

    public class MyViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {


    TextView product,count;

    public MyViewHolder(View itemview) {


    super(itemview);

    product = itemview.findViewById(R.id.ismi);


    count = itemview.findViewById(R.id.email);

    itemview.setOnClickListener(this);


    }

    @Override


    public void onClick(View view) {
    try {
    int positions = getAdapterPosition();
    // Toast.makeText(context, " " + positions + "-bosildi!", Toast.LENGTH_SHORT).show();
    Intent intent = new Intent(context, Order_datails.class);

    intent.putExtra("product", list.get(positions).product);


    intent.putExtra("weight", list.get(positions).weight);
    intent.putExtra("height", list.get(positions).hieght);
    intent.putExtra("addition", list.get(positions).addition);
    intent.putExtra("count", list.get(positions).count);

    context.startActivity(intent);


    }
    catch (Exception exception){

    Toast.makeText(context,"Adapter"+exception.getMessage() , Toast.LENGTH_SHORT).show();

    }

    }
    }


    }



    7-rasm.Mijoz buyurtmalari qismi

    8-rasm.Mijoz buyurtmasi haqida ma’lumot qismi

    9-rasm.Ilova haqida ma’lumot qismi

    Yüklə 1,18 Mb.

    Dostları ilə paylaş:
  • 1   2   3




    Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
    rəhbərliyinə müraciət

    gir | qeydiyyatdan keç
        Ana səhifə


    yükləyin