Code example for RatingBar

Methods: getRating

0
		HashMap<String, String>queryValuesMap = new HashMap<String, String>();
		Book book = new Book();
		book.setBookTitle(bookTitle.getText().toString());
		book.setBookAuthor(bookAuthor.getText().toString());
		book.setBookPages(bookPages.getText().toString());
		book.setBookRating(bookRating.getRating());
		 
		dbTools.insertBook(book);
		 
		this.callMainActivity(view);
	} 
	 
	public void callMainActivity(View view){
		Intent intent = new Intent(getApplication(), MainActivity.class);
		 
		startActivity(intent);
	} 
} 
Experience pair programming with AI  Get Codota for Java