| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -37,7 +37,6 @@ object ReadBookConfig { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (shareLayout) { | 
					 | 
					 | 
					 | 
					            if (shareLayout) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                shareConfig = value | 
					 | 
					 | 
					 | 
					                shareConfig = value | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            upBg() | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    var bg: Drawable? = null | 
					 | 
					 | 
					 | 
					    var bg: Drawable? = null | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -88,11 +87,8 @@ object ReadBookConfig { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        shareConfig = c ?: configList.getOrNull(5) ?: Config() | 
					 | 
					 | 
					 | 
					        shareConfig = c ?: configList.getOrNull(5) ?: Config() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    fun upBg() { | 
					 | 
					 | 
					 | 
					    fun upBg(width: Int, height: Int) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        val resources = appCtx.resources | 
					 | 
					 | 
					 | 
					        val tmp = bg | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        val dm = resources.displayMetrics | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        val width = dm.widthPixels | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        val height = dm.heightPixels | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        bg = durConfig.curBgDrawable(width, height).apply { | 
					 | 
					 | 
					 | 
					        bg = durConfig.curBgDrawable(width, height).apply { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (this is BitmapDrawable) { | 
					 | 
					 | 
					 | 
					            if (this is BitmapDrawable) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                bgMeanColor = bitmap.getMeanColor() | 
					 | 
					 | 
					 | 
					                bgMeanColor = bitmap.getMeanColor() | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -100,6 +96,7 @@ object ReadBookConfig { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                bgMeanColor = color | 
					 | 
					 | 
					 | 
					                bgMeanColor = color | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        (tmp as? BitmapDrawable)?.bitmap?.recycle() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    fun save() { | 
					 | 
					 | 
					 | 
					    fun save() { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -123,7 +120,6 @@ object ReadBookConfig { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (styleSelect > 0) { | 
					 | 
					 | 
					 | 
					            if (styleSelect > 0) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                styleSelect -= 1 | 
					 | 
					 | 
					 | 
					                styleSelect -= 1 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            upBg() | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return true | 
					 | 
					 | 
					 | 
					            return true | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        return false | 
					 | 
					 | 
					 | 
					        return false | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -572,11 +568,11 @@ object ReadBookConfig { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    1 -> { | 
					 | 
					 | 
					 | 
					                    1 -> { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        val path = "bg" + File.separator + curBgStr() | 
					 | 
					 | 
					 | 
					                        val path = "bg" + File.separator + curBgStr() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        val bitmap = BitmapUtils.decodeAssetsBitmap(appCtx, path, width, height) | 
					 | 
					 | 
					 | 
					                        val bitmap = BitmapUtils.decodeAssetsBitmap(appCtx, path, width, height) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        BitmapDrawable(resources, bitmap) | 
					 | 
					 | 
					 | 
					                        BitmapDrawable(resources, bitmap?.changeSize(width, height)) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    } | 
					 | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    else -> { | 
					 | 
					 | 
					 | 
					                    else -> { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        val bitmap = BitmapUtils.decodeBitmap(curBgStr(), width, height) | 
					 | 
					 | 
					 | 
					                        val bitmap = BitmapUtils.decodeBitmap(curBgStr(), width, height) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        BitmapDrawable(resources, bitmap) | 
					 | 
					 | 
					 | 
					                        BitmapDrawable(resources, bitmap?.changeSize(width, height)) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    } | 
					 | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                } | 
					 | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } catch (e: OutOfMemoryError) { | 
					 | 
					 | 
					 | 
					            } catch (e: OutOfMemoryError) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |