Skip to content

Instantly share code, notes, and snippets.

View SalaSuresh's full-sized avatar

Suresh Sala SalaSuresh

  • Bangalore
  • 20:32 (UTC +05:30)
View GitHub Profile
@SalaSuresh
SalaSuresh / MainActivity.java
Created April 17, 2018 07:05
Android recyclerview example with pagination using java.
package com.example.salasuresh.androidpractice.pagination_practice;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
@SalaSuresh
SalaSuresh / DBServlet.java
Created May 18, 2018 03:34
Google app engine search API example using java.
package com.suresh.search_practice;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@SalaSuresh
SalaSuresh / DBServlet.java
Created May 18, 2018 03:36
Google app engine search API example using java. refer the this link for Google app engine standard project (https://drive.google.com/file/d/1nAgKt9aCPpuc64InSN0dGg9eF_sDutvg/view?usp=sharing).
package com.suresh.search_practice;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@SalaSuresh
SalaSuresh / DemoActivity.java
Created June 3, 2020 18:03
This is the demo code to maintain the same data after changing orientation of application in Android. (This contains 2 sample code one onSaveInstanceState and another is using ViewModel)
package com.suresh.androidpractice.orientationchange;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.ViewModelProviders;