Skip to main content

All Questions

Filter by
Sorted by
Tagged with
3 votes
0 answers
395 views

Setting preference summary

I'm taking and Android course and I would like to refactor the code for one of the exercises. The complete solution done by tutors is here. When I was doing this exercise by myself I was annoyed by ...
alexpfx's user avatar
  • 524
2 votes
0 answers
171 views

Implementing FusedLocationProvider for more than one Activity in Android

I am trying to implement Google Maps in Android. I am also trying to learn different design patterns. I want to use location in more than one Activity hence I have used a class named 'GoogleLocation' ...
Tiny's user avatar
  • 21
3 votes
1 answer
3k views

Base activity for handling network state changes in Android

I had the need in one of my activies to handle displaying a message to the user when the network disconnected, and then reload the data for a RecyclerView adapter ...
PseudoPsyche's user avatar
4 votes
1 answer
47 views

Places and their PlaceCategories

I'm going to start small here because I actually have several questions but I'll go one at a time. In the app I am making to better learn Java/Android/SQL/OOP, I have a page where a user can define ...
The 29th Saltshaker's user avatar
1 vote
2 answers
721 views

Properly structuring SQLite classes/operations in Android

I am new to Android development and I want to ensure I'm learning decent practices for doing things. Right now this is my database class, which currently allows me to make a new instance of the ...
user6419910's user avatar
1 vote
0 answers
2k views

Repository pattern best practices

Which option is better? In the first case, I use a universal repository that can work with any entities. The methods of this repository have many parameters, such as string queries, table names, ...
Alexandr's user avatar
  • 371
5 votes
0 answers
14k views

Using the same RecyclerView.Adapter with a different ViewHolder

I would use the same RecyclerView.Adapter with two or more different fragments. Every fragment uses a different view items layout so I must use a different ...
Dave's user avatar
  • 111
3 votes
1 answer
1k views

Event Aggregator Pattern Decoupling

I have an Android application that is using an EventBus architecture with publishing and subscribing events. Usually this is ...
AndyRoid's user avatar
  • 293
8 votes
2 answers
1k views

Strategy Pattern Implementation

I thought I would learn a design pattern today and picked this one. I wrote a simple Android test demo to test the pattern. main.xml ...
user2405469's user avatar
7 votes
1 answer
297 views

Android game setup

I've been working on a basic Android game these days, but I'm a bit uncertain about my setup and need some advice. The basics of the game are simple: there are characters running on your screen and ...
DJanssens's user avatar
  • 1,470
2 votes
1 answer
112 views

Detaching logic from listener implementation in "Smart UI" approach to follow a proper pattern

I took this code segment from existing source on Android, but it applies to anything from ASP.NET Forms to anything else where the UI has an event callback, and the logic is implemented directly in ...
Zhuinden's user avatar
  • 464
7 votes
1 answer
441 views

Unit conversion activities

Please review these activities which handle converting units in an Android app: I would appreciate any guidance and advice on code refactoring and different design patterns or strategies that I ...
Novo's user avatar
  • 73
6 votes
2 answers
219 views

Create and organize some classes (hierarchy)

I'm trying to figure out what is the best way to create some objects in my application. The application is already running, but I want to structure things well and clean. These objects represents ...
Loris's user avatar
  • 163
3 votes
1 answer
2k views

TicTacToe - introduction to MVC pattern

After reading about MVC pattern in Head First Design Patterns, I've decided to write a TicTacToe app. I will not reveal the source code of the classes Matrix, <...
leonideveloper's user avatar
5 votes
1 answer
309 views

First introduction to MVC

I'm not sure that I fully understand this pattern. I've written a simple application that uses MVC. Please criticize my approach to the use of this pattern. For convenience, I'll post the source code ...
leonideveloper's user avatar

15 30 50 per page