This file contains 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.example.horizontalpagerjetpackcompose.ui | |
import android.annotation.SuppressLint | |
import androidx.compose.foundation.ExperimentalFoundationApi | |
import androidx.compose.foundation.layout.fillMaxSize | |
import androidx.compose.foundation.layout.padding | |
import androidx.compose.foundation.pager.HorizontalPager | |
import androidx.compose.foundation.pager.rememberPagerState | |
import androidx.compose.foundation.shape.RoundedCornerShape | |
import androidx.compose.material3.ExperimentalMaterial3Api |
This file contains 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
app: | |
datasource: | |
main: | |
driver-class-name: org.postgresql.Driver | |
jdbc-url: jdbc:postgresql://localhost:5432/amigoscode | |
username: amigoscode | |
password: 'password' | |
pool-size: 30 | |
server: |
This file contains 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
/* | |
* Copyright (C) 2019 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains 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
@Module | |
@InstallIn(SingletonComponent::class) | |
class ServerModule { | |
@Provides | |
@Singleton | |
fun provideRetrofit(): Retrofit { | |
return Retrofit.Builder() | |
.baseUrl(baseUrl) | |
.addConverterFactory(GsonConverterFactory.create()) |
This file contains 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
@AndroidEntryPoint | |
class ReserveFragment : Fragment(), DatePickerDialog.OnDateSetListener, | |
TimePickerDialog.OnTimeSetListener, SeekBar.OnSeekBarChangeListener { | |
// private lateinit var viewModel: ReserveViewModel | |
private lateinit var binding: FragmentReserveBinding | |
@Inject |
This file contains 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.chargeatfriends.android.ui.map | |
import android.Manifest | |
import android.app.NotificationChannel | |
import android.app.NotificationManager | |
import android.content.BroadcastReceiver | |
import android.content.Context | |
import android.content.Intent | |
import android.content.IntentFilter | |
import android.content.pm.PackageManager |
This file contains 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 MainActivity : AppCompatActivity() { | |
val mainView: View by lazy { binding.root } | |
private val binding: ActivityMainBinding by lazy { ActivityMainBinding.inflate(layoutInflater) } | |
private val navController: NavController by lazy { findNavController(R.id.main_nav_host_fragment) } | |
private val isNewUser: Boolean by lazy { | |
intent.getBooleanExtra( | |
LibAppKeys.KEY_ARGS_IS_NEW_USER, | |
false | |
) |
This file contains 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 CurrenciesAdapter(private val context: Context) : RecyclerView.Adapter<CurrenciesAdapter.MyViewHolder>() { | |
var list: List<CurrencyResponse> = listOf() | |
set(value) { | |
field = value | |
notifyDataSetChanged() | |
} | |
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MyViewHolder { | |
val inflater = LayoutInflater.from(context) |
This file contains 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 CurrenciesAdapter(private val context: Context, private var list: MutableList<CurrencyResponse>) : RecyclerView.Adapter<CurrenciesAdapter.MyViewHolder>() { | |
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MyViewHolder { | |
val inflater = LayoutInflater.from(context) | |
val view: View = inflater.inflate(R.layout.currency_layout,parent,false) | |
return MyViewHolder(view) | |
} | |
override fun getItemCount(): Int { |
This file contains 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 MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
val firstName = inputFirstName.text.toString() | |
val secondName = inputLastName.text.toString() | |
saveButton.setOnClickListener{ | |
saveFireStore(firstName, secondName) |
NewerOlder