나는 작은 위젯 앱을 만들었습니다. 어제는 프로그램에 더 많은 기능을 추가하기로 결정했기 때문에 위젯이 좋아 보이기 때문에 활동이 필요하지만 사용자 (목록보기, 필요한 버튼)에 대한 앱에서 더 많은 정보를 제공하고자합니다. 그래서/layout 폴더에서 나는 활동의 그래픽 디자인을위한 "config.xml"을 만들었습니다. 텍스트 뷰 만 있고 코딩 할 필요가 없습니다.위젯에 활동을 추가하는 방법
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.config);
TextView txt = (TextView) findViewById(R.id.TextView01);
txt.setText("Something");
}
}
의 AndroidManifest.xml : 내가 시작할 때
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bfarago.hellowidget"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<receiver android:name=".HelloWidget" android:label="@string/app_name">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="@xml/hello_widget_provider" />
</receiver>
<service android:enabled="true" android:name=".UpdateService" />
<activity android:name=".MainActivity"
android:label="@string/hello">
<intent_filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent_filter>
</activity>
</application>
문제가있다
그럼 내가 지옥으로 쉽게 보이는 MainActivity.java를 생성 응용 프로그램에서 다른 응용 프로그램 중 아이콘이 표시되지 않습니다. 나는 무엇을 놓치나요? 기본 이름 인 "사용자 응용 프로그램"(고해상도/값/strings.xml의에서) -