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
@ExperimentalAnimationApi | |
@ExperimentalMaterialApi | |
@Composable | |
fun MyExpandedList() { | |
var expanded by remember { mutableStateOf(false) } | |
val rotateState = animateFloatAsState( | |
targetValue = if (expanded) 180F else 0F, | |
) |
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
private void addPolylinesToMap(final DirectionsResult result){ | |
new Handler(Looper.getMainLooper()).post(new Runnable() { | |
@Override | |
public void run() { | |
Log.d(TAG, "run: result routes: " + result.routes.length); | |
if(mPolyLinesData.size() > 0){ | |
for(PolylineData polylineData: mPolyLinesData){ | |
polylineData.getPolyline().remove(); | |
} | |
mPolyLinesData.clear(); |
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 dao; | |
import java.util.Date; | |
import androidx.room.TypeConverter; | |
public class DateConverter { | |
@TypeConverter | |
public static Date toDate(Long timestamp){ | |
if(timestamp!=null){ |
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 dao; | |
import android.content.Context; | |
import androidx.room.Database; | |
import androidx.room.Room; | |
import androidx.room.RoomDatabase; | |
@Database(entities = {Student.class},version = 1, exportSchema = false) | |
public abstract class AppDatabase extends RoomDatabase { |
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 dao; | |
import java.util.List; | |
import androidx.room.Dao; | |
import androidx.room.Delete; | |
import androidx.room.Insert; | |
import androidx.room.OnConflictStrategy; | |
import androidx.room.Query; | |
import androidx.room.Update; |
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 dao; | |
import java.util.Date; | |
import androidx.room.Entity; | |
import androidx.room.PrimaryKey; | |
@Entity(tableName = "student_master") | |
public class Student{ | |
@PrimaryKey(autoGenerate = true) | |
private int sno; |
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
<?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=".MainActivity"> | |
<ImageView |
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
import android.app.NotificationChannel; | |
import android.app.NotificationManager; | |
import android.app.PendingIntent; | |
import android.content.Intent; | |
import android.graphics.drawable.BitmapDrawable; | |
import android.media.AudioAttributes; | |
import android.util.Log; | |
import com.ebiztechnocrats.biofuelindia.OldQuotation; | |
import com.ebiztechnocrats.biofuelindia.R; | |
import com.ebiztechnocrats.biofuelindia.ViewResponses; |
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
bar.setNavigationOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
Toast.makeText(getApplicationContext(),"Home Clicked",Toast.LENGTH_LONG).show(); | |
} | |
}); | |
bar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() { | |
@Override | |
public boolean onMenuItemClick(MenuItem item) { |
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
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.coordinatorlayout.widget.CoordinatorLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:background="@color/gray" | |
android:layout_height="match_parent"> | |
<!-- Other components and views --> |