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.app.testprojectbroadcast; | |
import androidx.appcompat.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
import java.util.Calendar; | |
import java.util.Date; |
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 fun showDialog(title:String,message:String){ | |
val mDialogView = LayoutInflater.from(context).inflate(R.layout.layout_dialog,null) | |
val mBuilder = AlertDialog.Builder(context) | |
.setView(mDialogView) | |
val alertDialog = mBuilder.show() | |
mDialogView.tv_title.text = title | |
mDialogView.tv_desc.text = message | |
mDialogView.btn_ok.setOnClickListener { |
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"?> | |
<layout> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:background="@drawable/drawable_white_background" | |
android:layout_margin="@dimen/_10sdp" | |
android:layout_height="wrap_content" |
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
Bitmap bitmap1; | |
String imageUrl = sharedPreferenceManager.getCurrentUser().getUserDetails().getImageUrl(); | |
Picasso.get().load(imageUrl).into(new Target() { | |
@Override | |
public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) { | |
bitmap1 = bitmap; | |
} | |
@Override | |
public void onBitmapFailed(Exception e, Drawable errorDrawable) { |
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 fun getScreenShot(view: View): Bitmap { | |
val returnedBitmap = Bitmap.createBitmap(view.width, view.height, Bitmap.Config.ARGB_8888) | |
val canvas = Canvas(returnedBitmap) | |
val bgDrawable = view.background | |
if (bgDrawable != null) | |
bgDrawable.draw(canvas) | |
else canvas.drawColor(Color.BLUE) | |
view.draw(canvas) | |
Toast.makeText(context, "screenshot captured", Toast.LENGTH_LONG).show() |
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
<color name="grey">#eeefee</color> | |
<color name="black">#191819</color> | |
<color name="white">#f7f6f9</color> |
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
//Design | |
implementation 'com.google.android.material:material:1.0.0' | |
//Retrofit | |
implementation 'com.squareup.retrofit2:retrofit:2.4.0' | |
implementation 'com.squareup.retrofit2:converter-gson:2.2.0' | |
//Date/Time | |
implementation 'org.ocpsoft.prettytime:prettytime:4.0.1.Final' | |
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 button1_Click(object sender, EventArgs e) | |
{ | |
panel3.BackColor = Color.FromArgb(144, 144, 144); | |
SqlConnection conn = new SqlConnection(); | |
conn.ConnectionString = @"Data Source=Desktop-D8FP0VA;Initial Catalog=cms;Integrated Security=True"; | |
conn.Open(); | |
SqlDataAdapter da; | |
DataTable dt; | |
using (da = new SqlDataAdapter | |
("select Username,Password from Admin where Password='" + password.Text + "' and Username ='" + textBox3.Text + "'", conn)) |