Sunday, 21 January 2024

Privacy Policy

Privacy Policy

We take privacy seriously. This policy outlines how we collect, use, and safeguard your information when you use our app.

Information We Collect

We may collect the following types of information:

  • Personal information such as name and email address, provided voluntarily by you.
  • Non-personal information such as device information, app usage, and technical data for analytics purposes.

How We Use Your Information

We use the collected information for the following purposes:

  • To provide and maintain the app.
  • To improve our services and develop new features.
  • To communicate with you, respond to your inquiries, and send updates.

Children's Privacy

This app is not intended for children under the age of 13. We do not knowingly collect personal information from children. If you are a parent or guardian and believe that your child has provided us with personal information, please contact us so that we can take necessary action.

Privacy Policy Changes

We reserve the right to update our privacy policy at any time. We will notify you of any changes by posting the new privacy policy on this page.

Contact Us

If you have any questions or concerns about our privacy policy, please contact us at privacy@example.com.

Monday, 15 August 2022

WHAT'S NEW IN . C# 10

 

Global Using Staments
File Scoped Namespaces

Const Interpolation String

Tuesday, 2 February 2021

ANDROID STUDIO PRACTICAL : LINK ACTIVITIES WITH INTENT : CS619

 




TO DOWNLOAD COMPLETE CODE
CLICK ON LINK BELOW



Screen 1 layout file

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center"
    android:gravity="center"
    android:layout_margin="15dp"
    android:orientation="vertical">

    <TextView
        android:layout_width="wrap_content"
        android:text="Login Screen"
        android:textSize="30sp"
        android:layout_margin="20dp"
        android:layout_height="wrap_content"></TextView>

    <EditText
        android:layout_margin="15dp"
        android:layout_width="match_parent"
        android:id="@+id/etUsername"
        android:hint="Enter Your ID"
        android:layout_height="wrap_content"></EditText>

    <EditText
        android:inputType="numberPassword"
        android:layout_margin="15dp"
        android:layout_width="match_parent"
        android:id="@+id/etPassword"
        android:hint="Enter Your Password"
        android:layout_height="wrap_content"></EditText>

    <Button
        android:onClick="btnLoginClick"
        android:layout_width="wrap_content"
        android:text="Login"
        android:id="@+id/btnLogin"
        android:layout_height="wrap_content"></Button>
</LinearLayout>

.............
Screen 1 Java File

package com.example.intents;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import javax.xml.transform.Source;

public class Screen1 extends AppCompatActivity
{
    EditText etUsername;
    EditText etPassword;
    String myUsername = "bs130200310";
    String myPassword = "111111111";
    String myName = "Rehan Attari";

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_screen1);

        etUsername = findViewById(R.id.etUsername);
        etPassword = findViewById(R.id.etPassword);

    }

    public void btnLoginClick(View view)
    {
        String inputUsername = etUsername.getText().toString();
        String inputPassword = etPassword.getText().toString();

        if (inputUsername.equals(myUsername) && inputPassword.equals(myPassword))
        {
            Toast.makeText(this, "Login Success", Toast.LENGTH_SHORT).show();
            Intent intent = new Intent(Screen1.this, Screen2.class);
            intent.putExtra("key", myName);
            startActivity(intent);

        } else
        {
            Toast.makeText(this, "Invalid Username Or Password. Please Try again", Toast.LENGTH_SHORT).show();
        }
    }
}

..........
Screen 2 layout file

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center"
    android:gravity="center"
    android:orientation="vertical">

<TextView
    android:id="@+id/tv"
    android:textSize="30sp"
    android:layout_width="wrap_content"
    android:text="Welcome"
    android:layout_height="wrap_content"></TextView>
</LinearLayout>


......

Screen 2 Java File

package com.example.intents;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

public class Screen2 extends AppCompatActivity
{
    TextView tv;

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_screen2);

        tv = findViewById(R.id.tv);

        Intent intent = getIntent();

        String receivedName = intent.getStringExtra("key");

        tv.setText("Welcome : " + receivedName);

    }
}

Monday, 25 January 2021

ANDROID STUDIO APP 2



xml code

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    android:layout_gravity="center"

    android:gravity="center"

    android:padding="20dp"

    android:orientation="vertical">


    <TextView

        android:layout_width="wrap_content"

        android:text="Addition Calcluator"

        android:textSize="30dp"

        android:layout_marginBottom="30dp"

        android:layout_height="wrap_content"></TextView>


    <EditText

        android:id="@+id/et1"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:hint="Enter Value 1"

        android:inputType="numberSigned"></EditText>


    <EditText

        android:id="@+id/et2"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:hint="Enter Value 2"

        android:inputType="numberSigned"></EditText>


    <Button

        android:onClick="getAnswer"

        android:id="@+id/btnAdd"

        android:layout_marginTop="20dp"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:text="Add"></Button>


    <TextView

        android:layout_marginTop="20dp"

        android:textSize="30dp"

        android:layout_width="wrap_content"

        android:id="@+id/tvAnswer"

        android:layout_height="wrap_content"></TextView>

</LinearLayout>



package com.example.additioncalculatorapp2;


import androidx.appcompat.app.AppCompatActivity;


import android.os.Bundle;

import android.view.View;

import android.widget.Button;

import android.widget.EditText;

import android.widget.TextView;

import android.widget.Toast;


public class MainActivity extends AppCompatActivity

{


    @Override

    protected void onCreate(Bundle savedInstanceState)

    {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);

    }


    public void getAnswer(View view)

    {

        // linking to layout xml file

        EditText editText1 = findViewById(R.id.et1);

        EditText editText2 = findViewById(R.id.et2);

        TextView tvAns = findViewById(R.id.tvAnswer);


        int input1 = Integer.parseInt ( editText1.getText().toString() );

        int input2 = Integer.parseInt ( editText2.getText().toString() );


        int answer = input1 + input2;

        

        tvAns.setText(String.valueOf(answer));

        

        Toast.makeText(this, String.valueOf(answer), Toast.LENGTH_SHORT).show();


    }

}

Tuesday, 27 October 2020