Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
2e605fcb
Kaydet (Commit)
2e605fcb
authored
Eki 19, 2013
tarafından
Artur Dryomov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix some comments and tabs positions.
Change-Id: I6678d8142f7cbe2446b178174ffb36d446aeda11
üst
afabf78f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
20 deletions
+14
-20
ComputersActivity.java
...libreoffice/impressremote/activity/ComputersActivity.java
+10
-16
ComputersPagerAdapter.java
...reoffice/impressremote/adapter/ComputersPagerAdapter.java
+4
-4
No files found.
android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java
Dosyayı görüntüle @
2e605fcb
...
...
@@ -29,14 +29,6 @@ import org.libreoffice.impressremote.util.Preferences;
import
org.libreoffice.impressremote.util.SavedStates
;
public
class
ComputersActivity
extends
SherlockFragmentActivity
implements
ActionBar
.
TabListener
,
ViewPager
.
OnPageChangeListener
{
private
static
final
class
TabsIndices
{
private
TabsIndices
()
{
}
public
static
final
int
BLUETOOTH
=
0
;
public
static
final
int
WIFI
=
1
;
}
private
boolean
mBluetoothWasEnabled
;
@Override
...
...
@@ -52,9 +44,9 @@ public class ComputersActivity extends SherlockFragmentActivity implements Actio
private
void
saveBluetoothState
(
Bundle
aSavedInstanceState
)
{
// In more ideal world this work should be done at the service.
// Unfortunately service cannot save or restore its state
//
but enabling or disabling Bluetooth is quite a long operation,
//
so we have more chances to manage state right at the activity
.
// Unfortunately service cannot save or restore its state
.
//
On other hand we should remember Bluetooth state exactly
//
after the app’s start and pass it during recreation cycle
.
if
(!
BluetoothOperator
.
isAvailable
())
{
return
;
...
...
@@ -78,7 +70,7 @@ public class ComputersActivity extends SherlockFragmentActivity implements Actio
private
void
setUpTitle
()
{
// Looks hacky but it seems to be the best way to set activity’s title
// different to application’s label. The other way is setting title
// to intents filter but it shows wrong label for recent apps screen.
// to intents filter but it shows wrong label for recent apps screen
then
.
ActionBar
aActionBar
=
getSupportActionBar
();
...
...
@@ -111,8 +103,10 @@ public class ComputersActivity extends SherlockFragmentActivity implements Actio
private
void
setUpTabs
()
{
ActionBar
aActionBar
=
getSupportActionBar
();
aActionBar
.
addTab
(
buildActionBarTab
(
R
.
string
.
title_bluetooth
),
TabsIndices
.
BLUETOOTH
);
aActionBar
.
addTab
(
buildActionBarTab
(
R
.
string
.
title_wifi
),
TabsIndices
.
WIFI
);
aActionBar
.
addTab
(
buildActionBarTab
(
R
.
string
.
title_bluetooth
),
ComputersPagerAdapter
.
PagesIndices
.
BLUETOOTH
);
aActionBar
.
addTab
(
buildActionBarTab
(
R
.
string
.
title_wifi
),
ComputersPagerAdapter
.
PagesIndices
.
WIFI
);
}
private
ActionBar
.
Tab
buildActionBarTab
(
int
aTitleResourceId
)
{
...
...
@@ -203,11 +197,11 @@ public class ComputersActivity extends SherlockFragmentActivity implements Actio
MenuItem
aComputerAddingMenuItem
=
aMenu
.
findItem
(
R
.
id
.
menu_add_computer
);
switch
(
getSupportActionBar
().
getSelectedNavigationIndex
())
{
case
Tab
sIndices
.
BLUETOOTH
:
case
ComputersPagerAdapter
.
Page
sIndices
.
BLUETOOTH
:
aComputerAddingMenuItem
.
setVisible
(
false
);
break
;
case
Tab
sIndices
.
WIFI
:
case
ComputersPagerAdapter
.
Page
sIndices
.
WIFI
:
aComputerAddingMenuItem
.
setVisible
(
true
);
default
:
...
...
android/sdremote/src/org/libreoffice/impressremote/adapter/ComputersPagerAdapter.java
Dosyayı görüntüle @
2e605fcb
...
...
@@ -17,8 +17,8 @@ import org.libreoffice.impressremote.fragment.ComputersFragment;
public
class
ComputersPagerAdapter
extends
FragmentPagerAdapter
{
private
static
final
int
PAGER_SIZE
=
2
;
p
rivate
static
final
class
PagerPosition
s
{
private
Page
rPosition
s
()
{
p
ublic
static
final
class
PagesIndice
s
{
private
Page
sIndice
s
()
{
}
public
static
final
int
BLUETOOTH
=
0
;
...
...
@@ -32,10 +32,10 @@ public class ComputersPagerAdapter extends FragmentPagerAdapter {
@Override
public
Fragment
getItem
(
int
aPosition
)
{
switch
(
aPosition
)
{
case
Page
rPosition
s
.
BLUETOOTH
:
case
Page
sIndice
s
.
BLUETOOTH
:
return
ComputersFragment
.
newInstance
(
ComputersFragment
.
Type
.
BLUETOOTH
);
case
Page
rPosition
s
.
WIFI
:
case
Page
sIndice
s
.
WIFI
:
return
ComputersFragment
.
newInstance
(
ComputersFragment
.
Type
.
WIFI
);
default
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment