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
*.iml | |
.gradle | |
/local.properties | |
/.idea/ | |
.DS_Store | |
/build | |
/captures | |
.externalNativeBuild |
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.madhatters.androidbasic; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.view.View; | |
import android.widget.EditText; | |
import android.widget.TextView; | |
import android.widget.Toast; | |
public class MainActivity extends AppCompatActivity implements View.OnClickListener { |
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
export default { | |
cat: { | |
list: { | |
title: "Categories", | |
labelName: "Name", | |
labelCar: "Car", | |
search: "Search", | |
filterCar: "Only Car?" | |
}, | |
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
export default { | |
aor: { | |
action: { | |
delete: 'Delete', | |
show: 'Show', | |
list: 'List', | |
save: 'Save', | |
create: 'Create', | |
edit: 'Edit', | |
cancel: 'Cancel', |
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.design.widget.AppBarLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
xmlns:local="http://schemas.android.com/apk/res-auto"> | |
<android.support.v7.widget.Toolbar | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:minHeight="?attr/actionBarSize" |
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 xmlns:app="http://schemas.android.com/apk/res-auto"> | |
<data> | |
<variable | |
name="user" | |
type="com.bullhead.classifiedapp.data.User" /> | |
</data> |
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 showMoreOptions(final View view, final int adapterPosition) { | |
PopupMenu menu = new PopupMenu(context, view); | |
menu.inflate(R.menu.more_options_ad); | |
menu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() { | |
@Override | |
public boolean onMenuItemClick(MenuItem menuItem) { | |
if (menuItem.getItemId() == R.id.delete_more_item) { | |
deleteAd(view, adapterPosition); | |
} else { | |
String json = new Gson().toJson(dataset.get(adapterPosition)); |
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 checkPurchaseHistory() { | |
Purchase.PurchasesResult purchasesResult=mBillingClient.queryPurchases(BillingClient.SkuType.SUBS); //we want to check subscription | |
if (purchasesResult!=null && purchasesResult.getPurchasesList()!=null && purchasesResult.getPurchasesList().size()>0){ | |
//so minimum one purchase was actually made | |
for (Purchase purchase:purchasesResult.getPurchasesList()) { | |
if (monthlySku.equals(purchase.getSku())){ | |
//we know monthly sub last 30 days and api gives us purchase time. | |
long purchaseTime=purchase.getPurchaseTime(); | |
Calendar purchaseDate=Calendar.getInstance(); |
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.madhatters.novappback.data; | |
import org.springframework.data.annotation.Id; | |
import org.springframework.data.mongodb.core.index.Indexed; | |
import org.springframework.data.mongodb.core.mapping.Document; | |
import java.io.Serializable; | |
@Document(collection = "categories") |