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
function addImage(data) { | |
let htmlContent = ''; | |
const firstImage = data.results[0]; | |
if (firstImage) { | |
htmlContent = `<figure> | |
<img src="${firstImage.urls.small}" alt="${searchedForText}"> | |
<figcaption>${searchedForText} by ${firstImage.user.name}</figcaption> | |
</figure>`; | |
} else { |
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 co.prandroid.alrertdialog_kotling | |
import android.content.Context | |
import android.support.v7.app.AppCompatActivity | |
import android.os.Bundle | |
import android.support.v7.app.AlertDialog | |
import android.view.View | |
import android.widget.EditText | |
import kotlinx.android.synthetic.main.activity_main.* | |
import android.text.InputType |
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"?> | |
<android.support.constraint.ConstraintLayout 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="co.prandroid.alrertdialog_kotling.MainActivity"> | |
<Button | |
android:id="@+id/buttonAlert" |
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.latch; | |
import java.util.Random; | |
import java.util.concurrent.CountDownLatch; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
/** | |
* Created by yubraj on 1/16/17. | |
*/ |
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 co.prandroid.soccerlivehd | |
import android.os.Build | |
import android.os.Bundle | |
import android.support.design.widget.BottomNavigationView | |
import android.support.v7.app.AppCompatActivity | |
import android.webkit.WebChromeClient | |
import android.webkit.WebSettings | |
import android.webkit.WebView | |
import android.webkit.WebViewClient |
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
class Urls { | |
companion object { | |
val YOUTUBE_URL="<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/kJQP7kiw5Fk\" frameborder=\"0\" allowfullscreen></iframe>" | |
val SOCCER_URL="<iframe src=\"http://www.Genti.Stream/hd/hd1.php\" width=\"320\" height=\"400\" frameborder=\"0\" scrolling=\"no\" allowfullscreen</iframe>" | |
val CRICKET_URL="<iframe frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\" height=\"490\" src=\"http://cricbox.net/embed/star3img.php\" name=\"iframe_a\" scrolling=\"no\" width=\"620\" frameborder=\"0\" allowfullscreen>Your Browser Do not Support Iframe</iframe>" | |
val GRAPH_URL= "<iframe width=\"450\" height=\"260\" style=\"border: 1px solid #cccccc;\" src=\"http://api.thingspeak.com/channels/31592/charts/1?width=450&height=260&results=60&dynamic=true\" ></iframe>" | |
} | |
} |
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 co.prandroid.roboelectrickotlinexample | |
import android.content.Intent | |
import android.widget.Button | |
import android.widget.TextView | |
import co.prandroid.robolectricexample.MainActivity | |
import co.prandroid.robolectricexample.SecondActivity | |
import org.junit.Test | |
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 co.prandroid.robolectricexample | |
import android.content.Intent | |
import android.support.v7.app.AppCompatActivity | |
import android.os.Bundle | |
import android.view.View | |
import co.prandroid.roboelectrickotlinexample.R | |
class MainActivity : AppCompatActivity() { |
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 co.prandroid.robolectricexample | |
import android.content.Intent | |
import android.support.v7.app.AppCompatActivity | |
import android.os.Bundle | |
import android.view.View | |
import co.prandroid.roboelectrickotlinexample.R | |
class SecondActivity : AppCompatActivity() { |
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"?> | |
<android.support.constraint.ConstraintLayout 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="co.prandroid.autosizingtextview.MainActivity"> | |
<TextView | |
android:id="@+id/textview" |