Revision b3e9cd22

View differences:

res/layout-v11/app_list_item.xml
1
<?xml version="1.0" encoding="utf-8"?>
2
<!--
3
     Copyright (C) 2010 The Android Open Source Project
4
     Licensed under the Apache License, Version 2.0 (the "License");
5
     you may not use this file except in compliance with the License.
6
     You may obtain a copy of the License at
7
          http://www.apache.org/licenses/LICENSE-2.0
8
     Unless required by applicable law or agreed to in writing, software
9
     distributed under the License is distributed on an "AS IS" BASIS,
10
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
     See the License for the specific language governing permissions and
12
     limitations under the License.
13
-->
14

  
15
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
16
    xmlns:tools="http://schemas.android.com/tools"
17
    android:layout_width="match_parent"
18
    android:layout_height="wrap_content"
19
    android:background="?android:attr/activatedBackgroundIndicator"
20
    android:minHeight="?android:attr/listPreferredItemHeight"
21
    android:paddingBottom="2dip"
22
    android:paddingTop="2dip" >
23

  
24
    <ImageView
25
        android:id="@+id/icon"
26
        android:layout_width="48dip"
27
        android:layout_height="48dip"
28
        android:layout_marginLeft="?attr/listPreferredItemPaddingLeft"
29
        android:layout_marginStart="?attr/listPreferredItemPaddingLeft"
30
        android:layout_marginTop="6dip"
31
        tools:ignore="ContentDescription" />
32

  
33
    <TwoLineListItem
34
        android:layout_width="match_parent"
35
        android:layout_height="wrap_content"
36
        android:mode="twoLine" >
37

  
38
        <TextView
39
            android:id="@+id/application_label"
40
            android:layout_width="match_parent"
41
            android:layout_height="wrap_content"
42
            android:layout_marginLeft="?attr/listPreferredItemPaddingLeft"
43
            android:layout_marginStart="?attr/listPreferredItemPaddingLeft"
44
            android:layout_marginTop="6dip"
45
            android:textAppearance="?attr/textAppearanceListItem" />
46

  
47
        <TextView
48
            android:id="@+id/package_name"
49
            android:layout_width="match_parent"
50
            android:layout_height="wrap_content"
51
            android:layout_alignStart="@+id/application_label"
52
            android:layout_below="@+id/application_label"
53
            android:textAppearance="?android:attr/textAppearanceSmall" />
54
    </TwoLineListItem>
55

  
56
</LinearLayout>
res/layout-v11/select_local_apps_list_item.xml
1
<?xml version="1.0" encoding="utf-8"?>
2
<!--
3
     Copyright (C) 2010 The Android Open Source Project
4
     Licensed under the Apache License, Version 2.0 (the "License");
5
     you may not use this file except in compliance with the License.
6
     You may obtain a copy of the License at
7
          http://www.apache.org/licenses/LICENSE-2.0
8
     Unless required by applicable law or agreed to in writing, software
9
     distributed under the License is distributed on an "AS IS" BASIS,
10
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
     See the License for the specific language governing permissions and
12
     limitations under the License.
13
-->
14

  
15
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
16
    xmlns:tools="http://schemas.android.com/tools"
17
    android:layout_width="match_parent"
18
    android:layout_height="wrap_content"
19
    android:background="?android:attr/activatedBackgroundIndicator"
20
    android:minHeight="?android:attr/listPreferredItemHeight"
21
    android:paddingBottom="2dip"
22
    android:paddingTop="2dip" >
23

  
24
    <ImageView
25
        android:id="@+id/icon"
26
        android:layout_width="48dip"
27
        android:layout_height="48dip"
28
        android:layout_marginLeft="?attr/listPreferredItemPaddingLeft"
29
        android:layout_marginStart="?attr/listPreferredItemPaddingLeft"
30
        android:layout_marginTop="6dip"
31
        tools:ignore="ContentDescription" />
32

  
33
    <TwoLineListItem
34
        android:layout_width="match_parent"
35
        android:layout_height="wrap_content"
36
        android:mode="twoLine" >
37

  
38
        <TextView
39
            android:id="@+id/application_label"
40
            android:layout_width="match_parent"
41
            android:layout_height="wrap_content"
42
            android:layout_marginLeft="?attr/listPreferredItemPaddingLeft"
43
            android:layout_marginStart="?attr/listPreferredItemPaddingLeft"
44
            android:layout_marginTop="6dip"
45
            android:textAppearance="?attr/textAppearanceListItem" />
46

  
47
        <TextView
48
            android:id="@+id/package_name"
49
            android:layout_width="match_parent"
50
            android:layout_height="wrap_content"
51
            android:layout_alignStart="@+id/application_label"
52
            android:layout_below="@+id/application_label"
53
            android:textAppearance="?android:attr/textAppearanceSmall" />
54
    </TwoLineListItem>
55

  
56
</LinearLayout>
res/layout/app_list_item.xml
1
<?xml version="1.0" encoding="utf-8"?>
2
<!--
3
     Copyright (C) 2010 The Android Open Source Project
4
     Licensed under the Apache License, Version 2.0 (the "License");
5
     you may not use this file except in compliance with the License.
6
     You may obtain a copy of the License at
7
          http://www.apache.org/licenses/LICENSE-2.0
8
     Unless required by applicable law or agreed to in writing, software
9
     distributed under the License is distributed on an "AS IS" BASIS,
10
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
     See the License for the specific language governing permissions and
12
     limitations under the License.
13
-->
14

  
15
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
16
    xmlns:tools="http://schemas.android.com/tools"
17
    android:layout_width="match_parent"
18
    android:layout_height="wrap_content"
19
    android:minHeight="?android:attr/listPreferredItemHeight"
20
    android:paddingBottom="2dip"
21
    android:paddingTop="2dip" >
22

  
23
    <ImageView
24
        android:id="@+id/icon"
25
        android:layout_width="48dip"
26
        android:layout_height="48dip"
27
        android:layout_marginLeft="?attr/listPreferredItemPaddingLeft"
28
        android:layout_marginStart="?attr/listPreferredItemPaddingLeft"
29
        android:layout_marginTop="6dip"
30
        tools:ignore="ContentDescription" />
31

  
32
    <TwoLineListItem
33
        android:layout_width="match_parent"
34
        android:layout_height="wrap_content"
35
        android:mode="twoLine" >
36

  
37
        <TextView
38
            android:id="@+id/application_label"
39
            android:layout_width="match_parent"
40
            android:layout_height="wrap_content"
41
            android:layout_marginLeft="?attr/listPreferredItemPaddingLeft"
42
            android:layout_marginStart="?attr/listPreferredItemPaddingLeft"
43
            android:layout_marginTop="6dip"
44
            android:textAppearance="?attr/textAppearanceListItem" />
45

  
46
        <TextView
47
            android:id="@+id/package_name"
48
            android:layout_width="match_parent"
49
            android:layout_height="wrap_content"
50
            android:layout_alignStart="@+id/application_label"
51
            android:layout_below="@+id/application_label"
52
            android:textAppearance="?android:attr/textAppearanceSmall" />
53
    </TwoLineListItem>
54

  
55
</LinearLayout>
res/layout/select_local_apps_list_item.xml
1
<?xml version="1.0" encoding="utf-8"?>
2
<!--
3
     Copyright (C) 2010 The Android Open Source Project
4
     Licensed under the Apache License, Version 2.0 (the "License");
5
     you may not use this file except in compliance with the License.
6
     You may obtain a copy of the License at
7
          http://www.apache.org/licenses/LICENSE-2.0
8
     Unless required by applicable law or agreed to in writing, software
9
     distributed under the License is distributed on an "AS IS" BASIS,
10
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
     See the License for the specific language governing permissions and
12
     limitations under the License.
13
-->
14

  
15
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
16
    xmlns:tools="http://schemas.android.com/tools"
17
    android:layout_width="match_parent"
18
    android:layout_height="wrap_content"
19
    android:minHeight="?android:attr/listPreferredItemHeight"
20
    android:paddingBottom="2dip"
21
    android:paddingTop="2dip" >
22

  
23
    <ImageView
24
        android:id="@+id/icon"
25
        android:layout_width="48dip"
26
        android:layout_height="48dip"
27
        android:layout_marginLeft="?attr/listPreferredItemPaddingLeft"
28
        android:layout_marginStart="?attr/listPreferredItemPaddingLeft"
29
        android:layout_marginTop="6dip"
30
        tools:ignore="ContentDescription" />
31

  
32
    <TwoLineListItem
33
        android:layout_width="match_parent"
34
        android:layout_height="wrap_content"
35
        android:mode="twoLine" >
36

  
37
        <TextView
38
            android:id="@+id/application_label"
39
            android:layout_width="match_parent"
40
            android:layout_height="wrap_content"
41
            android:layout_marginLeft="?attr/listPreferredItemPaddingLeft"
42
            android:layout_marginStart="?attr/listPreferredItemPaddingLeft"
43
            android:layout_marginTop="6dip"
44
            android:textAppearance="?attr/textAppearanceListItem" />
45

  
46
        <TextView
47
            android:id="@+id/package_name"
48
            android:layout_width="match_parent"
49
            android:layout_height="wrap_content"
50
            android:layout_alignStart="@+id/application_label"
51
            android:layout_below="@+id/application_label"
52
            android:textAppearance="?android:attr/textAppearanceSmall" />
53
    </TwoLineListItem>
54

  
55
</LinearLayout>
src/info/guardianproject/checkey/AppListAdapter.java
48 48
    @Override
49 49
    public View getView(int position, View view, ViewGroup parent) {
50 50
        if (view == null)
51
            view = inflater.inflate(R.layout.select_local_apps_list_item, parent, false);
51
            view = inflater.inflate(R.layout.app_list_item, parent, false);
52 52

  
53 53
        AppEntry appEntry = data.get(position);
54 54
        ImageView iconView = ViewHolder.get(view, R.id.icon);

Also available in: Unified diff