Today spent some time to customize Atom user stylesheet to display the background image for editor. Background image is a feature that I expected so much in either TextMate or Sublime. Now finally I have it in Atom.
Finding the class for each html component is a little bit tricky My theme is seti-ui.
Stylesheet to display background image
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//.react is needed to avoid impact on mini-editor
.editor.react {
// Fix the color strip between gutter and the editing area.
background: #0e1112;
.scroll-view {
// Align the Background Image with Editing Area
padding-left: 0;
margin-left: 10px;
// I put the background image under ~/.atom/images
For some reason, Android 4.4 KitKat has changed the implementation while starting activity.
In Android 4.3, Activity started from inactive Activity is also inactive. But in Android 4.4, Activity started form inactive Activity will be brought to front. Here, Inactive Activity means the activity paused by user pressing Home button or switch to another app.
This change won’t be felt in most sceanrios. But for activities that started from AsyncTask, it does have some significant impact on user experience.
I’m working on a app, that shows a Splash Screen when user logged in. And the Splash screen is implemented with activity.
It takes some time for app to communicate with backend server during the loggin in, and user might press “Home” button to temporarily leave the app during the time.
I don’t want the my splash screen to interrupt the user if the user returned to the home screen. So I wish to start the splash screen activity in the background if current acitivity has been brought to background.
It isn’t an issue on Android 4.3, but on Android 4.4 KitKat, it causes problem. I googled this issue and tried the FLAG_ACTIVITY_MULTIPLE_TASK, and comfirmed that it is not helping to this issue.
So I have to come up some kind of “hacking” solution as described below:
I add a isPaused property to BaseAcitity, which is the base class of all activities in my app.