Giter Site home page Giter Site logo

polidea / cockpit Goto Github PK

View Code? Open in Web Editor NEW
119.0 119.0 9.0 34.11 MB

Easily define a set of parameters that can be accessed and changed by the developers via built-in compact UI at runtime.

License: Apache License 2.0

Kotlin 99.52% Java 0.12% Shell 0.37%

cockpit's People

Contributors

bntnam avatar dariuszseweryn avatar marcinkornacki avatar martawoldanska avatar mikolak avatar piwonski avatar tomaszmnich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cockpit's Issues

Add alternative method of showing Cockpit screen

When the application's architecture doesn't give the access to context, it would be helpful to have something like Cockpit.getCockpitIntent() instead of just Cockpit.showCockpit(context: Context).

Unable to use cockpit with legacy Android Support

Describe the bug
The application fails to build with a message (the application uses legacy support packages, not the androidx yet)

* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
  	is also present at [androidx.core:core:1.0.1] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
  	Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:10:5-237:19 to override.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Library version
Version of Cockpit the issue occurs in: 3.0.1.

To reproduce

  1. Create project with the legacy support library (28.0.0)
  2. Try using Cockpit
  3. Build the app

Expected behavior
I could use Cockpit in projects without the androidx

Actual behavior
Build failed.

Screenshots
n/a

Device details
Not a device issue.

Core dependencies:

'com.android.tools.build:gradle:3.2.1'
Android Support 28.0.0

Automatically clearing callbacks

Describe the bug
Library allows to pass a callback that will be invoked when a button in Cockpit menu is clicked. It's easy to create a memory leak with the current implementation.

Library version
Version of Cockpit the issue occurs in: 3.0.1.

To reproduce
Add a callback:

// we're inside Activity's onCreate
Cockpit.addFooCallback {
    // access Activity methods or fields 
}

Such callback captures activity instance and is kept by Cockpit. If we rotate the device then we have a memory leak.
To avoid that we can do:

val fooCallback = ActionRequestCallback {
    // access Activity methods or fields 
}

// in onCreate
Cockpit.addFooCallback(fooCallback)

// in onDestroy
Cockpit.removeFooCallback(fooCallback)

Maybe it would be possible to automatically remove the callbacks when necessary? Or at least add a possibility to enable/disable automatic callback removal? I'm not 100% sure that we want to always remove them, it's a topic for discussion. Just wanted to leave it here.

Missing dependency to ColorPicker

Describe the bug
After Gradle sync and error occur ERROR: Failed to resolve: com.github.PolideaInternal:ColorPicker:1.0.0. As far as I understand the ColorPicker is available in JitPack only. Either promote it to JCenter or add information to the Readme to add the JitPack repository.

Library version
Version of Cockpit the issue occurs in: 3.1.1.

To reproduce
Configure project as readme describes

Expected behavior
Project compiles

Actual behavior
Error presented

Screenshots

Device details

Clicking on refresh icon causes the value to disappear

Library version
Version of Cockpit the issue occurs in: 3.0.0.

To reproduce

  1. Yaml file:
appVersion:
  type: read_only
  description: "Version"
  group: "General"
  1. In Activity.onCreate set the value like Cockpit.setAppVersion(BuildConfig.VERSION_NAME).
  2. Open Cockpit menu and click refresh icon in the top right corner.
  3. Observe disappearing app version value.

Expected behavior
Values should not disappear when clicking refresh.

Actual behavior
Values disappear when clicking refresh.

Device details
Tested on Android 5.0, 8.0 and 9.0

Add color picker for color's edition

Hex string in Cockpit dialog is read-only, whole item is clickable (not only color preview), after click, library's dialog is opened on custom-color tab

Back press not handles for sub-groups

Describe the bug
As soon as the back key (software or hardware) is pressed the cockpit fragment is closed.

Library version
Version of Cockpit the issue occurs in: 3.1.2.

To reproduce

  1. Create a configuration with
    group: "AAA/BBB

Expected behavior
Navigate back to cockpit home

Actual behavior
Cockpit closed

Development play

Hey :)

Is there any release plan for the library? What are the plans for future development/features? Anything in the pipeline?

Cockpit ActionBar is covered by StatusBar

Summary
NavigationBar on Samsung S8 can be hidden.
When NavigationBar is hidden, then Cockpit Action Bar is covered by StatusBar

Steps to reproduce

  1. Open Cockpit on SGS8
  2. Hide NavigationBar

Expected result:
Cockpit should fit to the screen size

Actual result:
Cockpit ActionBar is covered by StatusBar

Samsung S8 (android 8.0)
version: 3.0.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.