2018-10-22         Thomas

Can another person access my sqlite Data?

I was using firebase till now and a friend recommended me to use Sqlite.. I was wondering if i setup a quiz in my app and it stores the data to my phone's sqlite... can others get access to it if my internet connection is fine? i used to use firebase for such a purpose but was wondering if sqlite can perform this function Yes, others can get access to the data stored in that SQLite database. Here are just a couple of scenarios:You store the SQLite database on external storage (e.g. a microSD card) and someone gets access to that microSD card. (E.g. you leave your phone u...

 android                     4 answers                     20 view
 2018-10-22         Lewis

Gridview Scroll with OnTouchListener

Basically, I want to fast select item as well as scroll Gridview. In OnItemClickListener scroll working fine but its not fast select multiple item like OnTouchListener.My code:gridView.setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View v, MotionEvent me) { int action = me.getActionMasked(); float currentXPosition = me.getX(); float currentYPosition = me.getY(); int position = gridView.pointToPosition((int) currentXPosition, (int) currentYPosition); switch (action) { case ...

 android                     1 answers                     64 view
 2018-10-22         Alston

How to access view inside activity from adapter in android?

Does anyone knows how to access adapter imageView inside activity to hide the view. Please specify any example. I hope this will work for you.By using SharedPreferences we can easily hide the view from activity or fragment.Save flag in SharedPreferences i.e true from activity.If you are using Recyclerview then in onBindViewHolder method check conditionif(flag==true){ holder.yourView.setVisibility(View.GONE);}else{ holder.yourView.setVisibility(View.VISIBLE);} [XXX]Go to onBindViewHolder of the adapter and take the id of your imageview and code like thisholder.mI...

 android                     3 answers                     66 view
 2018-10-22         Dean

Animate views inside Recyclerview

I am animating a RecyclerView and everything is working fine except that the views inside the RecyclerView are not showing properly.Using common anim XML <?xml version="1.0" encoding="utf-8"?><set xmlns:android="http://schemas.android.com/apk/res/android"android:interpolator="@android:anim/linear_interpolator"><translate android:fromXDelta="-100%p" android:toXDelta="0" android:repeatCount="infinite" android:duration="3000"/>//IS WORKING FINE, MOVES RECYCLERVIEW ACROSS SCREEN !Code for RecyclerviewAnimation animLinear;//OnCreaterecyclerView = fi...

 android                     1 answers                     67 view
 2018-10-22         Monica

RecyclerView swap two adapters

I want to make an app which shows the last 15 match and next 15 matches using API.I created a RecyclerView with 2 different list view. One for the last match, and the other for the next match. I've also created 2 different adapters, so when I click the different navigation bar, it will change the view(for example last match) into another view(next match). However, when I click the second button(next match) it force stopped. I think the problem is in the Adapter set, but I don't know whereHere are my codes:MainActivity.ktprivate val mOnNavigationItemSelectedListener = Bottom...

 android                     1 answers                     68 view
 2018-10-22         Patrick

android motion events not triggered with drag listener

ProblemSo I have a recycler view populated by card views all with drag listeners attached, the motion events work fine until I set a view to be dragged, so with the line commented out this works, all logs are printed perfectlyholder.handleView.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { switch (MotionEventCompat.getActionMasked(event)){ case MotionEvent.ACTION_DOWN: Log.d("Adptr" , "ACTION_DOWN"); holder.cardView.setCardElevation(co...

 android                     1 answers                     69 view
 2018-10-22         Lorraine

what causes "permission denied"-message with FIREBASE and FLUTTER

I've got the error 'W/SyncTree(31625): Listen at /address failed: DatabaseError: Permission denied'while sending a request to firebase with an anonymous firebase user and without fancy firebase database rules :) . ..and i want to find out what causes this message.EDIT: error is the same with an existing user, means user signIn seems to work but accessing database not.What i've done so far:Set up firebase (including adding google_service.json, dependencies in pubspec.yaml) - works so farcreating login as follows (like in example from google link):Future<String> _test...

 android                     1 answers                     83 view
 2018-10-22         Bella

How do I import espresso withID on android studio?

I am trying to write a unit test with espresso for my application, but whenever I try to use withId, it cannot be found. How do I fix this?onView works fine, but when I try onView(withId) it doesn't work.Here is my code:package com.example.webowner.authenticate;import android.content.Context;import android.content.Intent;import android.support.test.InstrumentationRegistry;import android.support.test.espresso.Espresso;import android.support.test.rule.ActivityTestRule;import android.widget.Button;import android.widget.EditText;import android.widget.ProgressBar;import static a...

 android                     1 answers                     95 view
 2018-10-22         Jeremy

Android studio device file explorer gets stuck when downloading a file

When I try to download files from my device in Android Studios Device File Explorer the download always gets stuck.I open the folder in the Device File Explorer, right click on the file(s) and choose "Save as...". The problem occurs on several devices (same model).Above the progress bar it says: Downloading file 12 of 14: "/data/data/com.some.name/files/data.txt" (15,9 MB / 16,8 MB)But no matter how long I wait it doesnt continue to download.The only hint I could find are these lines in the log file (maybe they are completly irrelevant):09-06 12:49:14.385 3784-3812/? W/Sto...

 android                     1 answers                     96 view
 2018-10-22         Nicole

Migrate project to gradle file??This project does not use Gradle build system.We recommend that you migrate to using Gradle build system

Am not getting gradle file in the Android project as it is unavailable in android studio bt is available in project file folder. I tried a lot to resolve this issue but I failed.Thanks in Advance The project thinks it's still a non-Gradle based project; it's not the presence of the build.gradle file that makes it Gradle-based, but it's how the project was set up in the first place. You'll need to re-import your project to finish the conversion to Gradle.First, though, it looks like you don't have a settings.gradle file; it looks like you need one. Since you've set up you...

 android                     2 answers                     97 view
 2018-10-22         Olive

How Do I make an Activity with a Relative Layout, a Framelayout, NavigationBarLayout, scrollable in Android Studio?

I want to make my Activity scroll able but only the Framelayout. I'm using fragments, a Toolbar and a BottomNavBar and the FrameLayout is between the BottomNav and the Toolbar.main menu<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"android:id="@+id/container"android:layout_width="match_parent"android:layout_height="match_parent"android:background="@color/MainGreen"tools:context=".mainmenu"><include ...

 android                     4 answers                     99 view
 2018-10-22         Zora

Create (Cmake) C/C++ Library to Android without Android Studio

My goal is create a external library made in C/C++ which I can import in my Android Project.I know how to import, I know how to create a library from C/C++ inside the project using JNI, Cmake, etc. But this is not my goal.For this I'm using small steps, first with a simple library:gmath.c#include "gmath.h"#if defined(__GNUC__) && __GNUC__ >= 4#define GMATH_EXPORT __attribute__((visibility("default")))#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)#define GMATH_EXPORT __attribute__((visibility("default")))#else#define GMATH_EXPORT#endifGMATH_EXPORT u...

 android                     1 answers                     54 view
 2018-10-22         Miranda

VSTS Continuous Integration - Change SDK path

I'm looking for a solution for a problem. That is arise during Continuous Integration. To run the build command on my agent I have to give the path of the sdk of my server where build is going to be run. Normally the local.properties files are not part of git change list. I have come to know that there are git hooks for running custom scripts but after reading more, it seems like they are made for some other purpose.What I want is that after I push the code the sdk directory path in local.properties gets changed to reflect the sdk path of my server and whenever i pull the c...

 android                     1 answers                     73 view
 2018-10-22         Oscar

How to crop the screenshot please?

Hello i have a code to take a screenshot then share it and its work very wellBut i want to crop this screenshot from the both top and bottom .I hope to help me because i am new in coding .This is the code that i use it :share.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Bitmap bitmap = takeScreenshot(); saveBitmap(bitmap); shareIt(); } public Bitmap takeScreenshot() { View rootView = findViewById(android.R.id.content).getRootView(); rootView.setDrawingCacheEnabled(true); return ...

 android                     1 answers                     79 view
 2018-10-22         Walter

Array of Bitmap from array in xml file

I have in my array.xml an array of more than 100 images with all different name.<array name="icons"> <item>@drawable/setting</item> <item>@drawable/simplemode</item>...I need to load all them inside an array of BitmapHow can I do? Thanks Resources arrays that contains references to Drawables are called TypedArray in Android. You can refer to them very easily. Here's an example:TypedArray icons = getResources().obtainTypedArray(R.array.icons);Not, icons can retrieve the drawables for you. You can find the reference here: https:/...

 android                     1 answers                     24 view
 2018-10-22         Scott

How To Open Another Activity By Swiping

I am A beginner at android. I have created an app which loads news from JSON to recycler view. I want to open an activity when the user swipes from left to right. I tried different methods but it doesn't work for me. Please help. You have to create an activity first and put a view pager in it and switch between fragments : ( its better to use fragments at this kind of situations, u can swipe between ur fragments by using android view pager )Here is a great link that gonna help you :https://medium.com/@kyroschow/how-to-use-viewpager-for-navigating-between-fragments-with-t...

 android                     2 answers                     74 view

Page 1 of 4922  |  Show More Pages:  Top Prev Next Last