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
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/scene_container" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<ImageView | |
android:src="@drawable/ecomlogo1" | |
android:id="@+id/logo" | |
android:layout_width="wrap_content" | |
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
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/scene_container" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<ImageView | |
android:src="@drawable/ecomlogo1" | |
android:id="@+id/logo" | |
android:layout_width="80dp" | |
android:layout_height="80dp" |
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.bisapp.android_animations; | |
import android.os.Bundle; | |
import android.transition.ChangeBounds; | |
import android.transition.Fade; | |
import android.transition.Scene; | |
import android.transition.Transition; | |
import android.transition.TransitionManager; | |
import android.transition.TransitionSet; | |
import android.view.LayoutInflater; |
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
public void onViewCreated(@NonNull final View view, Bundle savedInstanceState) { | |
super.onViewCreated(view, savedInstanceState); | |
logo = view.findViewById(R.id.logo); | |
textView = view.findViewById(R.id.text_view); | |
sceneRoot.setOnClickListener(new View.OnClickListener() { | |
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) | |
@Override | |
public void onClick(View v) { |
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
//second_layout.xml | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/scene_container" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<ImageView | |
android:src="@drawable/ecomlogo1" | |
android:id="@+id/logo" |
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"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/master_layout" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical"> | |
<Button | |
android:id="@+id/goBtn" | |
android:layout_width="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
private void queryWordData() { | |
// A "projection" defines the columns that will be returned for each row | |
String[] projections = { | |
UserDictionary.Words._ID, // A contract class constant for _ID column name | |
UserDictionary.Words.WORD, // A contract class constant for WORD column name | |
UserDictionary.Words.APP_ID, // A contract class constant for APP_ID column name | |
UserDictionary.Words.LOCALE // A contract class constant for LOCALE column name | |
}; | |
//word to query from the UI |
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 insertWordData(){ | |
// Defines an object to contain the new values to insert | |
ContentValues contentValues = new ContentValues(); | |
contentValues.put(UserDictionary.Words.APP_ID, UUID.randomUUID().toString()); | |
contentValues.put(UserDictionary.Words.WORD,"new Word"); | |
contentValues.put(UserDictionary.Words.LOCALE, Locale.getDefault().toString()); | |
contentValues.put(UserDictionary.Words.FREQUENCY, "8"); | |
Uri newUri = getContentResolver().insert( | |
UserDictionary.Words.CONTENT_URI, // the user dictionary content URI |
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 updateWordData() { | |
// Defines an object to contain the new values to insert | |
ContentValues updateValues = new ContentValues(); | |
// Defines selection criteria for the rows you want to update | |
String selectionClause = UserDictionary.Words.LOCALE + " LIKE ?"; | |
String[] selectionArgs = {"en_%"}; | |
// Defines a variable to contain the number of updated rows | |
int rowsUpdated = 0; |
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 deleteWordData() { | |
// Defines selection criteria for the rows you want to delete | |
String selectionClause = UserDictionary.Words.APP_ID + " LIKE ?"; | |
String[] selectionArgs = {"user"}; | |
// Defines a variable to contain the number of rows deleted | |
int rowsDeleted = 0; | |
// Deletes the words that match the selection criteria |