This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/flipper" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
android:fillViewport="true"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.EditText; | |
import android.widget.TextView; | |
public class MainActivity extends AppCompatActivity { | |
//Declaration of components (editext & textview) and global variables (string and double) | |
EditText ed1, ed2; | |
String value1, value2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity" | |
android:orientation="vertical"> | |
<EditText |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void openMessage(View view) | |
{ | |
if (VERSION.SDK_INT >= VERSION_CODES.KITKAT) //At least KitKat | |
{ | |
String defaultSmsPackageName = Telephony.Sms.getDefaultSmsPackage(getApplicationContext()); //Need to change the build to API 19 | |
Intent sendIntent = new Intent(Intent.ACTION_SEND); | |
sendIntent.setType("text/plain"); | |
sendIntent.putExtra(Intent.EXTRA_TEXT, smsText); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//open calendar method | |
public void openCalendar(View view) | |
{ | |
Intent calendarIntent = new Intent() ; | |
calendarIntent.setClassName("com.android.calendar","com.android.calendar.AgendaActivity"); | |
} | |
//openbrowser method | |
public void openBrowser(View view) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.Manifest; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.provider.ContactsContract; | |
import android.provider.MediaStore; | |
import android.provider.Telephony; | |
import android.support.annotation.NonNull; | |
import android.support.annotation.RequiresApi; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('DB_HOST', 'localhost'); | |
define('DB_USER', 'root'); | |
define('DB_PASS', ''); | |
define('DB_NAME', 'heroes'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Class DbConnect | |
class DbConnect | |
{ | |
//Variable to store database link | |
private $con; | |
//Class constructor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class DbOperation | |
{ | |
//Database connection link | |
private $con; | |
//Class constructor | |
function __construct() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//getting the dboperation class | |
require_once '../includes/DbOperation.php'; | |
//function validating all the paramters are available | |
//we will pass the required parameters to this function | |
function isTheseParametersAvailable($params){ | |
//assuming all parameters are available | |
$available = true; | |
$missingparams = ""; | |
OlderNewer