Skip to content

Commit

Permalink
update 1.3.0 support librarie 28.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashok-Varma committed Oct 27, 2018
1 parent 3f808a4 commit 78d5727
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 38 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ Based on your IDE you can import library in one of the following ways

Gradle:
```groovy
debugCompile 'com.ashokvarma.android:sqlite-manager:1.2.1'
releaseCompile 'com.ashokvarma.android:sqlite-manager-no-op:1.2.1'
debugCompile 'com.ashokvarma.android:sqlite-manager:1.3.0'
releaseCompile 'com.ashokvarma.android:sqlite-manager-no-op:1.3.0'
```
If you want this in library in production also then try this :
```groovy
compile 'com.ashokvarma.android:sqlite-manager:1.2.1'
compile 'com.ashokvarma.android:sqlite-manager:1.3.0'
```


Expand All @@ -35,14 +35,14 @@ or grab via Maven:
<dependency>
<groupId>com.ashokvarma.android</groupId>
<artifactId>sqlite-manager</artifactId>
<version>1.2.1</version>
<version>1.3.0</version>
<type>pom</type>
</dependency>
```

or Ivy:
```xml
<dependency org='com.ashokvarma.android' name='sqlite-manager' rev='1.2.1'>
<dependency org='com.ashokvarma.android' name='sqlite-manager' rev='1.3.0'>
<artifact name='$AID' ext='pom'></artifact>
</dependency>
```
Expand Down Expand Up @@ -155,5 +155,5 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
[mavenAarDownload]: https://repo1.maven.org/maven2/com/ashokvarma/android/sqlite-manager/1.2.1/sqlite-manager-1.2.1.aar
[mavenAarDownload]: https://repo1.maven.org/maven2/com/ashokvarma/android/sqlite-manager/1.3.0/sqlite-manager-1.3.0.aar
[googlePlayStoreLink]: https://play.google.com/store/apps/details?id=com.ashokvarma.sqlitemanager.sample
16 changes: 8 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'

Expand All @@ -32,14 +32,14 @@ task clean(type: Delete) {

ext {
minSdkVersion = 14
targetSdkVersion = 27
compileSdkVersion = 27
buildToolsVersion = '27.0.3'
targetSdkVersion = 28
compileSdkVersion = 28
buildToolsVersion = '28.0.3'

supportLibVersion = '27.1.1'
supportLibVersion = '28.0.0'

roomDbVersion = "1.0.0"
roomDbVersion = "1.1.1"

LIBRARY_VERSION_NAME = "1.2.2"
LIBRARY_VERSION_CODE = 16
LIBRARY_VERSION_NAME = "1.3.0"
LIBRARY_VERSION_CODE = 17
}
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Jun 04 11:32:24 IST 2018
#Sat Oct 27 07:54:49 IST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
2 changes: 1 addition & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies {
})

implementation "com.android.support:appcompat-v7:$supportLibVersion"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'

//Third party database ORM's
implementation "android.arch.persistence.room:runtime:${rootProject.roomDbVersion}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,22 @@ protected void onCreate(Bundle savedInstanceState) {
mSqliteManagerPresenter = new SqliteManagerPresenter(SqliteManager.mSqliteDataRetriever, getIntent().getStringExtra(CSV_FILE_SHARE_AUTHORITY));

mSqliteManagerParent = findViewById(R.id.sqlite_manager_parent);
mTableSelectionSpinner = (AppCompatSpinner) findViewById(R.id.sqlite_manager_table_selection_spinner);
mTableSelectionSpinner = findViewById(R.id.sqlite_manager_table_selection_spinner);
mErrorLayout = findViewById(R.id.sqlite_manager_error_layout);
mTableLayout = findViewById(R.id.sqlite_manager_table_layout);
mColumnNameView = (ColumnNameView) findViewById(R.id.sqlite_manager_table_layout_header);
mErrorLayoutText = (TextView) findViewById(R.id.sqlite_manager_error_layout_text);
mTableLayoutRecyclerView = (RecyclerView) findViewById(R.id.sqlite_manager_table_layout_recycler_view);
mColumnNameView = findViewById(R.id.sqlite_manager_table_layout_header);
mErrorLayoutText = findViewById(R.id.sqlite_manager_error_layout_text);
mTableLayoutRecyclerView = findViewById(R.id.sqlite_manager_table_layout_recycler_view);
mActionCustomQuery = findViewById(R.id.sqlite_manager_action_custom_query);
mSqliteManagerAddFab = (FloatingActionButton) findViewById(R.id.sqlite_manager_add_fab);
mSqliteManagerAddFab = findViewById(R.id.sqlite_manager_add_fab);

mTableSelectionContainer = findViewById(R.id.sqlite_manager_table_selection_container);
mCustomQueryContainer = findViewById(R.id.sqlite_manager_custom_query_container);
mCustomQueryText = (TextView) findViewById(R.id.sqlite_manager_custom_query_text);
mCustomQueryEdit = (ImageView) findViewById(R.id.sqlite_manager_custom_query_edit);
mCustomQueryClear = (ImageView) findViewById(R.id.sqlite_manager_custom_query_clear);
mCustomQueryText = findViewById(R.id.sqlite_manager_custom_query_text);
mCustomQueryEdit = findViewById(R.id.sqlite_manager_custom_query_edit);
mCustomQueryClear = findViewById(R.id.sqlite_manager_custom_query_clear);

mToolbar = (Toolbar) findViewById(R.id.sqlite_manager_toolbar);
mToolbar = findViewById(R.id.sqlite_manager_toolbar);
setSupportActionBar(mToolbar);

mTableRecyclerAdapter = new TableRecyclerAdapter(null);
Expand Down Expand Up @@ -185,7 +185,7 @@ public void showCustomQueryDialog(String previousCustomQuery) {
LayoutInflater inflater = this.getLayoutInflater();
final View dialogView = inflater.inflate(R.layout.sqlite_manager_custom_query_dialog, null);

final TextInputEditText customQueryEditText = (TextInputEditText) dialogView.findViewById(R.id.sqlite_manager_custom_query_edit_text);
final TextInputEditText customQueryEditText = dialogView.findViewById(R.id.sqlite_manager_custom_query_edit_text);
customQueryEditText.setText(previousCustomQuery);

new AlertDialog
Expand Down Expand Up @@ -214,16 +214,16 @@ public void showAddEditRowDialog(final boolean isEdit, final String tableName, f

final View dialogView = inflater.inflate(R.layout.sqlite_manager_add_edit_dialog_container, null);

LinearLayout linearLayout = (LinearLayout) dialogView.findViewById(R.id.sqlite_manager_add_edit_dialog_container);
Button deleteButton = (Button) dialogView.findViewById(R.id.sqlite_manager_add_edit_dialog_delete);
Button cancelButton = (Button) dialogView.findViewById(R.id.sqlite_manager_add_edit_dialog_cancel);
Button updateButton = (Button) dialogView.findViewById(R.id.sqlite_manager_add_edit_dialog_update);
LinearLayout linearLayout = dialogView.findViewById(R.id.sqlite_manager_add_edit_dialog_container);
Button deleteButton = dialogView.findViewById(R.id.sqlite_manager_add_edit_dialog_delete);
Button cancelButton = dialogView.findViewById(R.id.sqlite_manager_add_edit_dialog_cancel);
Button updateButton = dialogView.findViewById(R.id.sqlite_manager_add_edit_dialog_update);

int index = 0;
for (String currentColumnName : tableColumnNames) {
View columnView = inflater.inflate(R.layout.sqlite_manager_add_edit_dialog_item, null);
((TextInputLayout) columnView.findViewById(R.id.sqlite_manager_add_edit_dialog_text_input_layout)).setHint(currentColumnName);
TextInputEditText currentInputEditText = (TextInputEditText) columnView.findViewById(R.id.sqlite_manager_add_edit_dialog_edit_text);
TextInputEditText currentInputEditText = columnView.findViewById(R.id.sqlite_manager_add_edit_dialog_edit_text);
editTextViews.add(currentInputEditText);
linearLayout.addView(columnView);
if (oldColumnValues != null && oldColumnValues.get(index) != null) {
Expand Down Expand Up @@ -286,7 +286,7 @@ public void onClick(View v) {

@Override
public void setSpinnerAdapter(ArrayList<String> tableNames) {
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, tableNames);
ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, tableNames);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
mTableSelectionSpinner.setAdapter(adapter);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ void updateRow(String tableName, String[] tableColumnNames, SparseArray<Object>
columnIndex++;
if (!TextUtils.isEmpty(currentColumnValue)) {
Object oldColumnValue = oldColumnValues.get(columnIndex);
if (oldColumnValue != null && oldColumnValue instanceof byte[]) {
if (oldColumnValue instanceof byte[]) {
if (!(Arrays.toString((byte[]) oldColumnValue)).equalsIgnoreCase(currentColumnValue)) {
// old and current value not equal
getView().informErrorToUser(R.string.sqlite_manager_blob_not_supported);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ List<SparseArray<Object>> getColumnIndexToValuesArray() {
return mColumnIndexToValuesArray;
}

public boolean isQuerySuccess() {
boolean isQuerySuccess() {
return mQuerySuccess;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.ashokvarma.sqlitemanager;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.util.SparseArray;
Expand Down Expand Up @@ -36,17 +37,18 @@ void setData(List<SparseArray<Object>> mColumnIndexToValuesArray) {
notifyDataSetChanged();
}

public void setListener(Listener listener) {
void setListener(Listener listener) {
this.mListener = listener;
}

@NonNull
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return new ViewHolder(new RowView(parent.getContext(), viewType));
}

@Override
public void onBindViewHolder(ViewHolder holder, int position) {
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
holder.mRowView.setData(mColumnIndexToValuesArray.get(position));
}

Expand Down

0 comments on commit 78d5727

Please sign in to comment.