public final void setResolution ( final int width , final int height ) { Condition . INSTANCE . ensureAtLeast ( width , 1 , "The width must be at least 1" ) ; Condition . INSTANCE . ensureAtLeast ( height , 1 , "The height must be at least 1" ) ; this . width = width ; this . height = height ; persistString ( formatResolution ( getContext ( ) , width , height ) ) ; notifyChanged ( ) ; }
Sets the current resolution of the preference . By setting a value it will be persisted .