-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Widget import export #352
base: master
Are you sure you want to change the base?
Widget import export #352
Conversation
add widget export/import feature
fix concurrency bug
import com.github.premnirmal.ticker.widget.WidgetData | ||
|
||
class ExportWidget() { | ||
lateinit var name: String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like the indentation is off in some of these files. Can you makes sure you follow the style guide listed in the contribution page https://github.com/premnirmal/StockTicker/blob/master/CONTRIBUTING.md#contributing-to-stockticker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah sorry I was just after some early input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am unable to use that project, but that is unrelated to this issue, I will start another.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using the latest version of Android Studio is that going to be an issue?
There seems to be no corelation between the project you linked to and code styles in android studio
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The instructions for the codestyle are in https://github.com/square/java-code-styles
Just to let you know, I am still working on this albeit slowly. Currently trying to solve this widget name bug (issue 285 https://github.com/premnirmal/StockTicker/issues/285 ) which occurs in the same code. |
Hi here is the bare bones of widget export import - I have only exported/imported the name, ticker list and 8 widge specific setings to a JSON file and back again. Im by no means an android expert, keen to learn if I have made any blunders
Note that this has exposed a pre-existing bug in that the spinner for choosing the widget is not updated when the name of a widget changes. Maybe you know how to do this - I worked out where in the WidgetSettingsFragment it needed to go but am not savvy enough to fix it just yet.
here is an example exported widget
{
"autoSort": "true",
"background": "1",
"hideHeader": "false",
"layout": "1",
"name": "FANG",
"showBold": "false",
"showCurrency": "false",
"textColor": "2",
"tickerList": "MSFT,GOOG,AAPL,TSLA,PLTR,INTC,META,AMZN,GME,AMC",
"widgetSize": "1"
}
My background is I was an enterprise software dev for a long time but retired from it, Im new to Kotlin but I have used js, java, c# and others. I use and love your widget so I wanted to contribute.