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.roomdatabase | |
import androidx.room.Database | |
import androidx.room.RoomDatabase | |
@Database (entities = [(BookEntity::class)],version = 1) | |
abstract class AppDb : RoomDatabase() { | |
abstract fun bookDao(): BookDAO | |
} |
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
dependencies { | |
def room_version = "2.1.0-rc01" | |
implementation "androidx.room:room-runtime:$room_version" | |
annotationProcessor "androidx.room:room-compiler:$room_version" // For Kotlin use kapt instead of annotationProcessor | |
// optional - Kotlin Extensions and Coroutines support for Room | |
implementation "androidx.room:room-ktx:$room_version" | |
// optional - RxJava support for Room |
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
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:dist="http://schemas.android.com/apk/distribution" | |
package="com.foodup"> | |
<dist:module | |
dist:instant="true" | |
dist:onDemand="false" | |
dist:title="@string/title_dynamic_feature"> | |
<dist:fusing dist:include="false" /> | |
</dist:module> |
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
@Override | |
public void onMapReady(GoogleMap googleMap) { | |
this.googleMap = googleMap; | |
MapStyleOptions mapStyleOptions=MapStyleOptions.loadRawResourceStyle(this,R.raw.google_style); | |
googleMap.setMapStyle(mapStyleOptions); | |
} |
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
dependencies { | |
implementation "com.google.android.gms:play-services-maps:16.1.0" | |
} |
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 MySwipeToRefresh extends SwipeRefreshLayout { | |
private int mTouchSlop; | |
private float mPrevX; | |
public MySwipeToRefresh (Context context, AttributeSet attrs) { | |
super(context, attrs); | |
mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); | |
} |
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 AppConstants | |
{ | |
companion object { | |
const val NUMBER = 1 | |
} | |
} |
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
object AppConstant | |
{ | |
const val NUMBER = 1 | |
} |
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 MeActivity extends BaseActivity { | |
private static final String TAG = MeActivity.class.getSimpleName(); | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
int number=AppConstant.MINIMUM_AGE; | |
Log.d(TAG, "onCreate: " + number); |
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 final class AppConstant { | |
public static final int MINIMUM_NUMBER = 4; | |
} |