Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #77 from sygic-travel/fix_and_deps_update
Browse files Browse the repository at this point in the history
Fix and deps update
  • Loading branch information
Michal Murín authored Aug 2, 2017
2 parents 802d5b4 + 285a88d commit 150739f
Show file tree
Hide file tree
Showing 18 changed files with 53 additions and 53 deletions.
18 changes: 9 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
compileSdkVersion 26
buildToolsVersion "26.0.1"

defaultConfig {
applicationId "com.sygic.travel.sdkdemo"
minSdkVersion 15
targetSdkVersion 25
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -30,15 +30,15 @@ dependencies {
compile project(":sdk")

// google
compile 'com.google.android.gms:play-services-location:11.0.2'
compile 'com.google.android.gms:play-services-maps:11.0.2'
compile 'com.google.android.gms:play-services-location:11.0.4'
compile 'com.google.android.gms:play-services-maps:11.0.4'
compile 'com.google.android:flexbox:0.3.0'

// Android
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.android.support:design:25.4.0'
compile 'com.android.support:cardview-v7:25.4.0'
compile 'com.android.support:recyclerview-v7:25.4.0'
compile 'com.android.support:appcompat-v7:26.0.0'
compile 'com.android.support:design:26.0.0'
compile 'com.android.support:cardview-v7:26.0.0'
compile 'com.android.support:recyclerview-v7:26.0.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'

// photos
Expand Down
11 changes: 6 additions & 5 deletions app/src/main/java/com/sygic/travel/sdkdemo/DemoMainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.sygic.travel.sdkdemo
import android.content.Intent
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.widget.Button
import com.sygic.travel.sdk.StSDK
import com.sygic.travel.sdkdemo.favorites.FavoritesActivity
import com.sygic.travel.sdkdemo.list.PlacesListActivity
Expand All @@ -23,11 +24,11 @@ class DemoMainActivity : AppCompatActivity() {
}

private fun initUI() {
findViewById(R.id.btn_map_activity).setOnClickListener { startMapActivity() }
findViewById(R.id.btn_list_activity).setOnClickListener { startListActivity() }
findViewById(R.id.btn_search_activity).setOnClickListener { startSearchActivity() }
findViewById(R.id.btn_tours_activity).setOnClickListener { startToursActivity() }
findViewById(R.id.btn_favorites_activity).setOnClickListener { startFavoritesActivity() }
findViewById<Button>(R.id.btn_map_activity).setOnClickListener { startMapActivity() }
findViewById<Button>(R.id.btn_list_activity).setOnClickListener { startListActivity() }
findViewById<Button>(R.id.btn_search_activity).setOnClickListener { startSearchActivity() }
findViewById<Button>(R.id.btn_tours_activity).setOnClickListener { startToursActivity() }
findViewById<Button>(R.id.btn_favorites_activity).setOnClickListener { startFavoritesActivity() }
}

private fun startMapActivity() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,20 +214,20 @@ class PlaceDetailActivity : AppCompatActivity() {
}

private inner class Views internal constructor() {
internal var ivPhoto: ImageView = findViewById(R.id.iv_detail_photo) as ImageView
internal var tvName: TextView = findViewById(R.id.tv_name) as TextView
internal var tvNameSuffix: TextView = findViewById(R.id.tv_name_suffix) as TextView
internal var tvPerex: TextView = findViewById(R.id.tv_perex) as TextView
internal var tvDescription: TextView = findViewById(R.id.tv_description) as TextView
internal var tvRating: TextView = findViewById(R.id.tv_rating) as TextView
internal var tvAddress: TextView = findViewById(R.id.tv_address) as TextView
internal var tvPhone: TextView = findViewById(R.id.tv_phone) as TextView
internal var tvEmail: TextView = findViewById(R.id.tv_email) as TextView
internal var tvAdmission: TextView = findViewById(R.id.tv_admission) as TextView
internal var tvOpeningHours: TextView = findViewById(R.id.tv_opening_hours) as TextView
internal var fblTags: FlexboxLayout = findViewById(R.id.fbl_tags) as FlexboxLayout
internal var llReferencesList: LinearLayout = findViewById(R.id.ll_references_list) as LinearLayout
internal var cbFavorite: CheckBox = findViewById(R.id.cb_favorite) as CheckBox
internal var ivPhoto: ImageView = findViewById(R.id.iv_detail_photo)
internal var tvName: TextView = findViewById(R.id.tv_name)
internal var tvNameSuffix: TextView = findViewById(R.id.tv_name_suffix)
internal var tvPerex: TextView = findViewById(R.id.tv_perex)
internal var tvDescription: TextView = findViewById(R.id.tv_description)
internal var tvRating: TextView = findViewById(R.id.tv_rating)
internal var tvAddress: TextView = findViewById(R.id.tv_address)
internal var tvPhone: TextView = findViewById(R.id.tv_phone)
internal var tvEmail: TextView = findViewById(R.id.tv_email)
internal var tvAdmission: TextView = findViewById(R.id.tv_admission)
internal var tvOpeningHours: TextView = findViewById(R.id.tv_opening_hours)
internal var fblTags: FlexboxLayout = findViewById(R.id.fbl_tags)
internal var llReferencesList: LinearLayout = findViewById(R.id.ll_references_list)
internal var cbFavorite: CheckBox = findViewById(R.id.cb_favorite)
}

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class ReferenceActivity : AppCompatActivity() {
if (loaded) {
return
}
progressBar = findViewById(R.id.pb_reference) as ProgressBar
progressBar = findViewById(R.id.pb_reference)

webView = findViewById(R.id.wv_reference) as WebView
webView = findViewById(R.id.wv_reference)
webView!!.settings.javaScriptEnabled = true
webView!!.settings.domStorageEnabled = true
webView!!.settings.setSupportZoom(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class FavoritesActivity : AppCompatActivity() {

// Recycler view initialization - list with dividers
private fun initRecycler() {
rvPlaces = findViewById(R.id.rv_places) as RecyclerView
rvPlaces = findViewById(R.id.rv_places)
rvPlaces!!.layoutManager = LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)
rvPlaces!!.addItemDecoration(DividerItemDecoration(this, DividerItemDecoration.VERTICAL))
placesAdapter = PlacesAdapter(onPlaceClick, Utils.getDetailPhotoSize(this))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CategoriesDialog(context: Context, private val onCategoryClick: Categories

private fun render() {
setContentView(R.layout.categories_dialog)
val rvCategories = findViewById(R.id.rv_categories) as RecyclerView
val rvCategories = findViewById<RecyclerView>(R.id.rv_categories)
rvCategories.layoutManager = LinearLayoutManager(context)
rvCategories.addItemDecoration(DividerDecoration(context, R.drawable.line_divider))
rvCategories.adapter = CategoriesAdapter(onCategoryClick)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class GalleryActivity : AppCompatActivity() {
}

private fun initRecycler() {
rvGallery = findViewById(R.id.rv_gallery) as RecyclerView
rvGallery = findViewById(R.id.rv_gallery)
rvGallery!!.layoutManager = LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)
rvGallery!!.addItemDecoration(DividerDecoration(this, R.drawable.line_divider))
galleryAdapter = GalleryAdapter(onPhotoClick, Utils.getDetailPhotoSize(this))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class GalleryAdapter(
vItem: View,
private val galleryPhotoClick: ViewHolder.GalleryPhotoClick
) : RecyclerView.ViewHolder(vItem), View.OnClickListener {
var ivPhoto: ImageView = vItem.findViewById(R.id.iv_gallery_photo) as ImageView
var ivPhoto: ImageView = vItem.findViewById(R.id.iv_gallery_photo)

init {
vItem.setOnClickListener(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class PhotoActivity : AppCompatActivity() {
.with(this)
.load(photoUrl)
.placeholder(R.drawable.ic_photo_camera)
.into(findViewById(R.id.iv_gallery_photo) as ImageView)
.into(findViewById<ImageView>(R.id.iv_gallery_photo))
}

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ class PlacesAdapter(
}

class ViewHolder(vItem: View, private val placeClick: ViewHolder.PlaceClick) : RecyclerView.ViewHolder(vItem), View.OnClickListener {
internal val ivPlacePhoto: ImageView = vItem.findViewById(R.id.iv_place_item_photo) as ImageView
internal val tvPlaceName: TextView = vItem.findViewById(R.id.tv_place_item_name) as TextView

internal val ivPlacePhoto: ImageView = vItem.findViewById(R.id.iv_place_item_photo)
internal val tvPlaceName: TextView = vItem.findViewById(R.id.tv_place_item_name)
init {
vItem.setOnClickListener(this)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class PlacesListActivity : AppCompatActivity() {

// Recycler view initialization - list with dividers
private fun initRecycler() {
rvPlaces = findViewById(R.id.rv_places) as RecyclerView
rvPlaces = findViewById(R.id.rv_places)
rvPlaces!!.layoutManager = LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)
rvPlaces!!.addItemDecoration(DividerItemDecoration(this, DividerItemDecoration.VERTICAL))
placesAdapter = PlacesAdapter(onPlaceClick, Utils.getDetailPhotoSize(this))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SearchActivity : AppCompatActivity() {

// Recycler view initialization - list with dividers
private fun initRecycler() {
rvPlaces = findViewById(R.id.rv_result_places) as RecyclerView
rvPlaces = findViewById(R.id.rv_result_places)
rvPlaces!!.layoutManager = LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)
rvPlaces!!.addItemDecoration(DividerItemDecoration(this, DividerItemDecoration.VERTICAL))
placesAdapter = PlacesAdapter(onPlaceClick, Utils.getDetailPhotoSize(this))
Expand Down Expand Up @@ -113,7 +113,7 @@ class SearchActivity : AppCompatActivity() {
// Sets listners for search edit text.
private fun setSearchListeners(searchItem: MenuItem) {
val searchView = MenuItemCompat.getActionView(searchItem) as SearchView
val searchEdit = searchView.findViewById(R.id.search_src_text) as EditText
val searchEdit = searchView.findViewById<EditText>(R.id.search_src_text)

searchEdit.imeOptions = EditorInfo.IME_ACTION_SEARCH
searchEdit.setOnEditorActionListener(getOnKeyboardEnterClickListener())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class ToursActivity : AppCompatActivity(), ToursAdapter.ListItemClickListener {

// Recycler view initialization - list with dividers
private fun initRecycler() {
rvTours = findViewById(R.id.rv_tours) as RecyclerView
rvTours = findViewById(R.id.rv_tours)
rvTours!!.layoutManager = LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)
rvTours!!.addItemDecoration(DividerItemDecoration(this, DividerItemDecoration.VERTICAL))
toursAdapter = ToursAdapter(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ internal class ToursAdapter(
}

internal inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView), View.OnClickListener {
internal val ivTourPhoto: ImageView = itemView.findViewById(R.id.iv_tour_item_photo) as ImageView
internal val tvTourName: TextView = itemView.findViewById(R.id.tv_tour_item_name) as TextView
internal val ivTourPhoto: ImageView = itemView.findViewById(R.id.iv_tour_item_photo)
internal val tvTourName: TextView = itemView.findViewById(R.id.tv_tour_item_name)

init {
itemView.setOnClickListener(this)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
buildscript {
ext.kotlin_version = '1.1.3-2'
ext.dokka_version = '0.9.15'
ext.room_version = '1.0.0-alpha3'
ext.room_version = '1.0.0-alpha7'

repositories {
jcenter()
Expand Down
8 changes: 4 additions & 4 deletions sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ ext {
}

android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
compileSdkVersion 26
buildToolsVersion "26.0.1"


defaultConfig {
minSdkVersion 15
targetSdkVersion 25
targetSdkVersion 26
versionCode 1
versionName stVersion

Expand Down Expand Up @@ -75,7 +75,7 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.android.support:appcompat-v7:26.0.0'
testCompile "junit:junit:4.12"
testCompile "com.nhaarman:mockito-kotlin:1.4.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ internal class ApiDescription : ApiModel<Description> {
@SerializedName("translation_provider")
var translationProvider: String? = null

@SerializedName("url")
var url: String? = null
@SerializedName("link")
var link: String? = null

override fun convert(): Description {
val description = Description()

description.text = text
description.provider = provider
description.translationProvider = translationProvider
description.url = url
description.link = link

return description
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ class Description {
var text: String? = null
var provider: String? = null
var translationProvider: String? = null
var url: String? = null
var link: String? = null
}

0 comments on commit 150739f

Please sign in to comment.