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 hmac | |
import hashlib | |
import time | |
import requests | |
import json | |
import os | |
import uuid | |
from typing import Optional, Tuple | |
# --- CONFIGURATION: REPLACE THESE WITH YOUR ACTUAL VALUES --- |
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
package edu.pace.pclc.homework1; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.Menu; | |
import android.view.MenuItem; | |
import android.widget.CompoundButton; | |
import android.widget.Switch; | |
import android.widget.TextView; |
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
private TextView counterView; | |
private Switch mySwitch; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_second); | |
counterView = (TextView)findViewById(R.id.counterView); | |
mySwitch = (Switch)findViewById(R.id.switch1); |
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
Button button= (Button) findViewById(R.id.countButton); button.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
// do something | |
Log.d(TAG, "onClick was called"); | |
counter++; | |
TextView countview = (TextView) findViewById(R.id.countView); | |
countview.setText(""+counter); | |
} |
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
Button button= (Button) findViewById(R.id.button); button.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
// do something | |
Log.d(TAG, "onClick was called"); | |
Intent intent = new Intent(v.getContext(), MyActivity2.class); | |
startActivity(intent); | |
} | |
}); |
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
activity_edit_animal.xml | |
------------------------ | |
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="#CCCCCC" | |
android:orientation="vertical" | |
android:paddingTop="1dp" > |
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
---------------DBController.java--------------- | |
package com.bytefly.zooexample; | |
import java.util.ArrayList; | |
import android.content.ContentValues; | |
import android.content.Context; | |
import android.database.Cursor; | |
import android.database.sqlite.SQLiteDatabase; |
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"?> | |
<GridView xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/gridView1" | |
android:numColumns="auto_fit" | |
android:gravity="center" | |
android:columnWidth="100dp" | |
android:stretchMode="columnWidth" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" > |
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
package com.bytefly.handlersample; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.os.Message; | |
import android.app.Activity; | |
import android.view.Menu; | |
import android.view.View; | |
import android.widget.Button; | |
import android.widget.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
package com.bytefly.handlersample; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.os.Message; | |
import android.app.Activity; | |
import android.view.Menu; | |
import android.view.View; | |
import android.widget.Button; | |
import android.widget.EditText; |
NewerOlder