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.example.room_ravi.db; | |
import androidx.room.RoomDatabase; | |
public abstract class AppDatabase extends RoomDatabase { | |
} |
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 class MainPresenter { | |
public static final String TAG="MainActivity"; | |
private MainView mainView; | |
private List_kiril list_kiril; | |
CompositeDisposable compositeDisposable=new CompositeDisposable(); | |
public MainPresenter(MainView mainView) { | |
this.mainView = mainView; | |
} | |
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
val requestOptions = RequestOptions() | |
.placeholder(R.color.lightwhite) | |
.error(R.color.red_100) | |
.diskCacheStrategy(DiskCacheStrategy.ALL) | |
.centerCrop() | |
holder.image.apply { | |
Glide.with(context) | |
.applyDefaultRequestOptions(requestOptions) | |
.load(Uri.parse(data[position].food_image)) | |
.transition(DrawableTransitionOptions.withCrossFade()) |
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
// Adapteri viewpagerni | |
class ViewPagerAdapter(fm: FragmentManager,var stringList:ArrayList<String> | |
,var fragmentList:ArrayList<Fragment>) | |
: FragmentStatePagerAdapter(fm,BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) { | |
override fun getItem(position: Int): Fragment { | |
return fragmentList[position] | |
} | |
override fun getCount(): Int {return stringList.size} |
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 HozirgiZakazlar :Fragment() { | |
lateinit var viewModel: RestaurantsViewModel | |
lateinit var preference: LocationPreference | |
lateinit var adapterhozir:HozirgiZakazAdapter | |
lateinit var recyclerView: RecyclerView | |
private var layoutManager: RecyclerView.LayoutManager? = null | |
var progressbar:ProgressBar?=null | |
var user_id:Int?=null | |
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 HozirgiZakazlar :Fragment() { | |
lateinit var viewModel: RestaurantsViewModel | |
lateinit var preference: LocationPreference | |
lateinit var adapterhozir:HozirgiZakazAdapter | |
lateinit var recyclerView: RecyclerView | |
private var layoutManager: RecyclerView.LayoutManager? = null | |
var progressbar:ProgressBar?=null | |
var user_id:Int?=null | |
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
// MainActivity | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
@Suppress("DEPRECATION") | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { | |
window.insetsController?.hide(WindowInsets.Type.statusBars()) | |
} else { | |
window.setFlags( | |
WindowManager.LayoutParams.FLAG_FULLSCREEN, | |
WindowManager.LayoutParams.FLAG_FULLSCREEN |
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
// Manifestdagi xolatt | |
<activity android:name=".ui.MainActivity" | |
android:theme="@style/Theme.AppCompat.Light.NoActionBar" | |
android:windowSoftInputMode="stateAlwaysHidden|adjustPan"/> | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
@Suppress("DEPRECATION") | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { |
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
<application | |
android:name=".viewModel.RestaurantApplication" | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" | |
android:networkSecurityConfig="@xml/network_security_config" | |
android:requestLegacyExternalStorage="true" | |
android:roundIcon="@mipmap/ic_launcher_round" | |
android:supportsRtl="true" | |
android:theme="@style/FullscreenDialogtheme" |
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 FoodDetailFragment : DialogFragment() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
requireActivity().window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS) | |
setStyle(STYLE_NORMAL, R.style.FullscreenDialogtheme) | |
} | |
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { | |
val view:View= inflater.inflate(R.layout.fragment_food_detail, container, false) |
OlderNewer